libs and other stuff ankh missed
This commit is contained in:
parent
14ca315213
commit
4b877df2d9
Binary file not shown.
@ -32,6 +32,23 @@
|
||||
Executed when the user is forbidden from seeing the requested page
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Models.JsonReturn">
|
||||
<summary>
|
||||
Represents a simple, consistent object to use for AJAX responses
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Portoa.Web.Models.JsonReturn.Error">
|
||||
<summary>
|
||||
Gets or sets the error message that occurred. If <c>null</c>, it's assumed
|
||||
that no error occurred.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Portoa.Web.Models.JsonReturn.Data">
|
||||
<summary>
|
||||
Gets or sets any extra data the client may be expecting. This value should
|
||||
not be null.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Models.ResolveWithServiceProviderModelBinder`1">
|
||||
<summary>
|
||||
Model binder that uses a service provider to resolve the model binder designated by
|
||||
@ -143,6 +160,14 @@
|
||||
Handles global application errors by invoking the specified error controller
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Models.FlagEnumModelBinder">
|
||||
<summary>
|
||||
Binds an enumeration annotated with the <c>FlagsAttribute</c>
|
||||
</summary>
|
||||
<remarks>
|
||||
Adapted from http://blog.nathan-taylor.net/2010/06/aspnet-mvc-flags-enumeration-model.html
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Unity.ConfigureInterception">
|
||||
<summary>
|
||||
Configures interception to occur for any subsequent container registrations
|
||||
@ -301,21 +326,21 @@
|
||||
to the response object
|
||||
</summary>
|
||||
<param name="errorMessage">The error message to display to the user</param>
|
||||
<see cref="M:Portoa.Web.Controllers.ControllerExtensions.CreateJsonResponse(System.Web.Mvc.Controller,System.String,System.Collections.Generic.IDictionary{System.String,System.String})"/>
|
||||
<see cref="M:Portoa.Web.Controllers.ControllerExtensions.CreateJsonResponse(System.Web.Mvc.Controller,System.String,System.Object)"/>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.Controllers.ControllerExtensions.CreateJsonErrorResponse(System.Web.Mvc.Controller,System.Exception)">
|
||||
<summary>
|
||||
Creates a JSON response from an <c>Exception</c>
|
||||
</summary>
|
||||
<see cref="M:Portoa.Web.Controllers.ControllerExtensions.CreateJsonResponse(System.Web.Mvc.Controller,System.String,System.Collections.Generic.IDictionary{System.String,System.String})"/>
|
||||
<see cref="M:Portoa.Web.Controllers.ControllerExtensions.CreateJsonResponse(System.Web.Mvc.Controller,System.String,System.Object)"/>
|
||||
<seealso cref="M:Portoa.Web.Controllers.ControllerExtensions.CreateJsonErrorResponse(System.Web.Mvc.Controller,System.String)"/>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.Controllers.ControllerExtensions.CreateJsonResponse(System.Web.Mvc.Controller,System.String,System.Collections.Generic.IDictionary{System.String,System.String})">
|
||||
<member name="M:Portoa.Web.Controllers.ControllerExtensions.CreateJsonResponse(System.Web.Mvc.Controller,System.String,System.Object)">
|
||||
<summary>
|
||||
Creates a JSON response object
|
||||
</summary>
|
||||
<param name="errorMessage">The error message to display to the user</param>
|
||||
<param name="data">Any data that needs to be passed to the client</param>
|
||||
<param name="data">Any extra data that needs to be passed to the client</param>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.Controllers.ControllerExtensions.DoNotUseTempData(System.Web.Mvc.Controller)">
|
||||
<summary>
|
||||
@ -350,51 +375,6 @@
|
||||
Uses an <c>IUnityContainer</c> to create controllers
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Unity.ContainerResolvingServiceProvider">
|
||||
<summary>
|
||||
Service provider that uses an <c>IUnityContainer</c> to instantiate and locate services
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.Unity.CallHandlerExtensions.GetInstanceMethodInfo(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation)">
|
||||
<summary>
|
||||
Gets the MethodInfo associated with the actual object instance
|
||||
in a CallHandler's method invocation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.Unity.CallHandlerExtensions.GetParameters(Microsoft.Practices.Unity.InterceptionExtension.IParameterCollection)">
|
||||
<summary>
|
||||
LINQifies an annoying IParameterCollection
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Unity.ApplyUnityConfigurationSection">
|
||||
<summary>
|
||||
Reads the app config and applies the Unity configuration, if applicable
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.IInjectableControllerFactory">
|
||||
<summary>
|
||||
<c cref="T:System.Web.Mvc.IControllerFactory">IControllerFactory</c> that provides a mechanism to perform injection
|
||||
on the controller after it is instantiated
|
||||
</summary>
|
||||
</member>
|
||||
<member name="E:Portoa.Web.IInjectableControllerFactory.OnControllerInstantiated">
|
||||
<summary>
|
||||
Event that fires after a controller is instantiated
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.ServiceProviderControllerFactory">
|
||||
<summary>
|
||||
Controller factory that uses a service provider to resolve controllers
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.HttpRequestBaseExtensions.Get``1(System.Web.HttpRequestBase,System.String)">
|
||||
<summary>
|
||||
Gets an object from the request variables, or its default value if
|
||||
the key does not exist
|
||||
</summary>
|
||||
<typeparam name="T">The type to convert the value to</typeparam>
|
||||
<param name="key">The request key of the object to retrieve</param>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.MvcApplicationBase">
|
||||
<summary>
|
||||
Base for an MVC application using Unity/NHibernate
|
||||
@ -451,13 +431,42 @@
|
||||
does nothing
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Models.FlagEnumModelBinder">
|
||||
<member name="T:Portoa.Web.IInjectableControllerFactory">
|
||||
<summary>
|
||||
Binds an enumeration annotated with the <c>FlagsAttribute</c>
|
||||
<c cref="T:System.Web.Mvc.IControllerFactory">IControllerFactory</c> that provides a mechanism to perform injection
|
||||
on the controller after it is instantiated
|
||||
</summary>
|
||||
</member>
|
||||
<member name="E:Portoa.Web.IInjectableControllerFactory.OnControllerInstantiated">
|
||||
<summary>
|
||||
Event that fires after a controller is instantiated
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Unity.ContainerResolvingServiceProvider">
|
||||
<summary>
|
||||
Service provider that uses an <c>IUnityContainer</c> to instantiate and locate services
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.Unity.CallHandlerExtensions.GetInstanceMethodInfo(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation)">
|
||||
<summary>
|
||||
Gets the MethodInfo associated with the actual object instance
|
||||
in a CallHandler's method invocation
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.Unity.CallHandlerExtensions.GetParameters(Microsoft.Practices.Unity.InterceptionExtension.IParameterCollection)">
|
||||
<summary>
|
||||
LINQifies an annoying IParameterCollection
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Unity.ApplyUnityConfigurationSection">
|
||||
<summary>
|
||||
Reads the app config and applies the Unity configuration, if applicable
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.ServiceProviderControllerFactory">
|
||||
<summary>
|
||||
Controller factory that uses a service provider to resolve controllers
|
||||
</summary>
|
||||
<remarks>
|
||||
Adapted from http://blog.nathan-taylor.net/2010/06/aspnet-mvc-flags-enumeration-model.html
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Portoa.Web.Results.StatusOverrideResult">
|
||||
<summary>
|
||||
@ -465,5 +474,13 @@
|
||||
</summary>
|
||||
<see cref="T:Portoa.Web.Filters.OverrideStatusCodeFilter"/>
|
||||
</member>
|
||||
<member name="M:Portoa.Web.HttpRequestBaseExtensions.Get``1(System.Web.HttpRequestBase,System.String)">
|
||||
<summary>
|
||||
Gets an object from the request variables, or its default value if
|
||||
the key does not exist
|
||||
</summary>
|
||||
<typeparam name="T">The type to convert the value to</typeparam>
|
||||
<param name="key">The request key of the object to retrieve</param>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
BIN
Lib/Portoa.dll
BIN
Lib/Portoa.dll
Binary file not shown.
@ -58,6 +58,20 @@
|
||||
Determines if the entity has already been persisted
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Persistence.EntityExtensions.ToDto``3(Portoa.Persistence.Entity{``0,``1})">
|
||||
<summary>
|
||||
Converts an entity to its DTO representation. If the entity does not implement
|
||||
<see cref="T:Portoa.Persistence.IDtoMappable`1"/>, then an empty <typeparamref name="TDto"/> object
|
||||
is returned.
|
||||
</summary>
|
||||
<typeparam name="TDto">The type to map the entity to</typeparam>
|
||||
</member>
|
||||
<member name="M:Portoa.Util.CollectionExtensions.AddRange``1(System.Collections.Generic.ICollection{``0},System.Collections.Generic.IEnumerable{``0})">
|
||||
<summary>
|
||||
Iterates over the <paramref name="collectionToAdd"/> and adds each item
|
||||
to the <paramref name="source"/> collection
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.Entity`2">
|
||||
<summary>
|
||||
Represents a domain object that can be persisted by an <see cref="T:Portoa.Persistence.IRepository`2"/>
|
||||
@ -497,6 +511,23 @@
|
||||
Equivalent of "select *"
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.EntityNotFoundException">
|
||||
<summary>
|
||||
Raised when an entity was not found
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.PersistenceException">
|
||||
<summary>
|
||||
Raised when an error occurred in the persistence layer
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.EntityNotFoundException`2">
|
||||
<summary>
|
||||
Raised when an entity was not found
|
||||
</summary>
|
||||
<typeparam name="T">The entity type</typeparam>
|
||||
<typeparam name="TId">The entity's identifier type</typeparam>
|
||||
</member>
|
||||
<member name="T:Portoa.Logging.DebugLogger">
|
||||
<summary>
|
||||
<see cref="T:Portoa.Logging.ILogger"/> implementation that writes using system diagnostic tool
|
||||
@ -542,6 +573,16 @@
|
||||
the object, its properties and its fields.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.ITransactableService">
|
||||
<summary>
|
||||
Represents a service object that can start a transaction
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Persistence.ITransactableService.BeginTransaction">
|
||||
<summary>
|
||||
Begins a transaction and returns the resultant <see cref="T:Portoa.Persistence.IUnitOfWork"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Validation.DataAnnotations.EmailAttribute">
|
||||
<summary>
|
||||
Validates that a string is a valid email address. Set AllowEmpty to true
|
||||
@ -553,11 +594,6 @@
|
||||
Gets or sets whether to allow empty strings
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.PersistenceException">
|
||||
<summary>
|
||||
Raised when an error occurred in the persistence layer
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Logging.LoggingExtensions.IsLoggable(System.Reflection.ICustomAttributeProvider)">
|
||||
<summary>
|
||||
Determines if this object should be logged
|
||||
@ -568,26 +604,26 @@
|
||||
Signifies that this object should not be logged
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.EntityNotFoundException">
|
||||
<member name="M:Portoa.Util.DateTimeExtensions.AsUnixTimestamp(System.Int32)">
|
||||
<summary>
|
||||
Raised when an entity was not found
|
||||
Converts a Unix timestamp to a <see cref="T:System.DateTime"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.EntityNotFoundException`2">
|
||||
<member name="M:Portoa.Util.DateTimeExtensions.ToUnixTimestamp(System.DateTime)">
|
||||
<summary>
|
||||
Raised when an entity was not found
|
||||
</summary>
|
||||
<typeparam name="T">The entity type</typeparam>
|
||||
<typeparam name="TId">The entity's identifier type</typeparam>
|
||||
</member>
|
||||
<member name="T:Portoa.Persistence.ITransactableService">
|
||||
<summary>
|
||||
Represents a service object that can start a transaction
|
||||
Converts a <see cref="T:System.DateTime"/> to a Unix timestamp (number of seconds since
|
||||
1970-01-01)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Portoa.Persistence.ITransactableService.BeginTransaction">
|
||||
<member name="T:Portoa.Persistence.IDtoMappable`1">
|
||||
<summary>
|
||||
Begins a transaction and returns the resultant <see cref="T:Portoa.Persistence.IUnitOfWork"/>
|
||||
Exposes an interface to map an object to a DTO representation
|
||||
</summary>
|
||||
<typeparam name="TDto">The DTO to map to</typeparam>
|
||||
</member>
|
||||
<member name="M:Portoa.Persistence.IDtoMappable`1.ToDto">
|
||||
<summary>
|
||||
Returns a DTO representation of this object
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
|
@ -128,7 +128,7 @@ namespace VideoGameQuotes.Web.Services {
|
||||
var records = quoteRepository.Records.ToArray();
|
||||
|
||||
return records
|
||||
.OrderByDescending(quote => quote.NetVotes)
|
||||
.OrderByDescending(quote => quote.Score)
|
||||
.ThenByDescending(quote => quote.UpVotes)
|
||||
.Skip(start)
|
||||
.Take(end - start + 1);
|
||||
|
@ -10,7 +10,7 @@
|
||||
<span class="vote-for" title="I like this quote">▲</span>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="quote-score" title="+<%= Model.Quote.UpVotes %>, -<%= Model.Quote.DownVotes %>"><%= Model.Quote.NetVotes %></div>
|
||||
<div class="quote-score" title="+<%= Model.Quote.UpVotes %>, -<%= Model.Quote.DownVotes %>"><%= Model.Quote.Score %></div>
|
||||
<div class="vote-container">
|
||||
<% if (!Model.VotedDown) { %>
|
||||
<span class="vote-against" title="I hate this quote">▼</span>
|
||||
|
@ -23,13 +23,13 @@ namespace VideoGameQuotes.Api.Tests {
|
||||
|
||||
Assert.That(quote.UpVotes, Is.EqualTo(1));
|
||||
Assert.That(quote.DownVotes, Is.EqualTo(0));
|
||||
Assert.That(quote.NetVotes, Is.EqualTo(1));
|
||||
Assert.That(quote.Score, Is.EqualTo(1));
|
||||
|
||||
quote.VoteFor(user, VoteDirection.Down);
|
||||
|
||||
Assert.That(quote.UpVotes, Is.EqualTo(0));
|
||||
Assert.That(quote.DownVotes, Is.EqualTo(1));
|
||||
Assert.That(quote.NetVotes, Is.EqualTo(-1));
|
||||
Assert.That(quote.Score, Is.EqualTo(-1));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user