Skip to content
roger-castaldo edited this page Apr 11, 2022 · 1 revision

Contents

ASecurityCheck type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

An abstract class used to implement Security Check attributes. These can be tagged on both classes and methods and will call HasValidAccess passing the session and other relevant data any time anything inside the assigned class is access or in the case of a method, any time that method is called.

HasValidAccess(session,model,url,parameters) method

Summary

Called to check if the current secure session has access to make the given call

Parameters
Name Type Description
session T:Org.Reddragonit.VueJSMVCDotNet.Interfaces.ISecureSession The secure Session passed to the Request Handler
model T:Org.Reddragonit.VueJSMVCDotNet.Interfaces.IModel The model in question (can be null if the model is not loaded at this point)
url T:System.String The url that was called for the request
parameters T:System.Collections.Hashtable Any parameters supplied with the request

ExposedMethod type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

This attribute is used to expose a method to a javascript based called for a model. A static call will be attached to the Model object, whereas a non-static call will be attached to an instance of the model and is used to perform operations on the model.Allow null response is used to indicate that the function can respond with null, otherwise null response is treated as an error.

#ctor(allowNullResponse,isSlow,arrayElementType) constructor

Summary

Tag a method as being exposed to allow for it to be called from the javascript side as either and instance method (non-static) or a non-instance method (static).

Parameters
Name Type Description
allowNullResponse T:System.Boolean Set to true if a response can be null, if not, an exception will be thrown if null is returned
isSlow T:System.Boolean Set true to tag the method as a slow method. This means that this method will take a long enough time
        that the potential for the connection to timeout exists, so additional code calls will be made to handle 
        running the method in the background. |

| arrayElementType | T:System.Type | Set to the type of element that is going to be supplied in a slow response array. |

ModelDeleteMethod type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to mark the Delete Method for a model which requires no parameters and to return bool on success or failure

ModelIgnoreProperty type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to Ignore a property for model generation.

ModelJSFilePath type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to specify the js path that the javascript code for this model will be written to

#ctor(path) constructor

Summary

Constructor for tagging the ModelJSPath

Parameters
Name Type Description
path T:System.String The url path to identify what url to provide the javascript definition of this model to.

ModelListMethod type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to create custom collection list of a method. Created through calling the function by its name in the code.The return is a List or Type[] where Type is the IModel class.
When using paging, you must add the paramters int startIndex, int pageSize, out int totalPages

#ctor(path,paged) constructor

Summary

Constructor to tag a model listing method

Parameters
Name Type Description
path T:System.String The url to assign to the list method
paged T:System.Boolean Indicates wheter or not the list is paged

ModelLoadAllMethod type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to tag the Load All Models method

ModelLoadMethod type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to tag the Load Method for a given model

ModelRequiredField type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to indicate that the property is not allowed to be null. Which is used in the validate function.

ModelRoute type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to specify the route(path) to use for accessing the model

#ctor(path,host) constructor

Summary

Define the base route for the model that all rest paths will be built off of.

Parameters
Name Type Description
path T:System.String The base path for the model's rest calls
host T:System.String (Optional) specify a host that is used, in the case of using more than one host.

ModelSaveMethod type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to mark the model save method which returns a bool

ModelUpdateMethod type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to indicate the Update method for the model called to update its items, return bool.

ReadOnlyModelProperty type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

Used to specify an uneditable readonly property for a given model

UseFormData type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Attributes

Summary

This attribute is used to expose to flag a method call to use formdata for posting the data back to the server instead of JSON encoding which is used by default. This is done in situations where JSON encoding the values might be a problem.

AddItem type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

This delegate is used as a variable in an exposed method, this allows it to supply an array result in chunks of single entries at a time for methods that take a long time to generate their reponse.

Parameters
Name Type Description
item ---- The item to add to the output array
isLast ---- set true for when the last item has been added

InsecureAccessException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

Thrown when a call made fails the security check

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

NoRouteException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when no routes to a given model were specified by attributes

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

DuplicateRouteException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when more than one model is mapped to the same route

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

DuplicateLoadMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when more than one Load method exists in a given model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

DuplicateLoadAllMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when more than one Load all method exists in a given model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidLoadMethodReturnType type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the return type of a load method is not of the model or of the models inheritance

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidLoadMethodArguements type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the paremeters of a load method are not valid (ie either string, or ISecureSession and a string

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidLoadAllMethodReturnType type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the return type of a load all method is not an array or List<> of the model type

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidLoadAllArguements type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the return type of a load all method is not either parameterless or only contains one parameter and thats ISecureSession

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

NoLoadMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when no Load method is specified

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

ModelValidationException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

special exception designed to house all found validation exceptions

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InnerExceptions property

Summary

All the exceptions found when validating the model definitions

ModelIDBlockedException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the id property of the model is tagged as block

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

NoEmptyConstructorException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when no empty constructor is specifed but adding the model has not been blocked

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelListMethodReturnException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the return type for the ModelListMethod function is not valid

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelListParameterCountException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the path specified does not contain the proper number of method parameters

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelListParameterTypeException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the parameter of a ModelListMethod is not a usable parameter

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelListPageParameterTypeException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when a parameter used for paging a model list is not a valid type of parameter

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelListPageTotalPagesNotOutException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the parameter to indicate the total pages in a paged model list is not an out parameter

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelListParameterOutException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the parameter of a ModelListMethod is an out parameter and it is not a paged call

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelListNotAllPagedException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when multiple ModelListMethod are delcared and 1 or more but not all are declared as paged

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

DuplicateModelSaveMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the ModelSaveMethod Attribute is specified more than once in the Model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

DuplicateModelDeleteMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the ModelDeleteMethod Attribute is specified more than once in the Model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

DuplicateModelUpdateMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the ModelUpdateMethod Attribute is specified more than once in the Model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelSaveMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the ModelSaveMethod Attribute is specified more than once in the Model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelDeleteMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the ModelDeleteMethod Attribute is specified more than once in the Model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

InvalidModelUpdateMethodException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when the ModelUpdateMethod Attribute is specified more than once in the Model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

DuplicateMethodSignatureException type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when an ExposedMethod will have the same javascript signature as another for a model

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

MethodNotMarkedAsSlow type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when an ExposedMethod uses the AddItem delegate but is not marked as slow

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

MethodUsesAddItemNotVoid type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

thrown when an ExposedMethod uses the AddItem delegate but has a return value

#ctor(info,context) constructor

Summary

Used to serialize the excepion when necessary

Parameters
Name Type Description
info T:System.Runtime.Serialization.SerializationInfo
context T:System.Runtime.Serialization.StreamingContext

LogLevels type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Interfaces

Summary

Used for specifying the level of the log message coming through

Trace constants

Summary

Lowest level, will display lots of detail and all other levels are reported

Debug constants

Summary

Mid-admount of details, only critical will be reported as well

Critical constants

Summary

Only log errors

ILogWriter type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Interfaces

Summary

Implement this interface to allow interception of the Logging calls from the code.

LogLevel property

Summary

Returns the logging level handled by this log writer

WriteLogMessage(timestamp,level,message) method

Summary

The method called to write a log message

Parameters
Name Type Description
timestamp T:System.DateTime The timestamp for when the message occured
level T:Org.Reddragonit.VueJSMVCDotNet.Interfaces.LogLevels The level of the message
message T:System.String The message

IModel type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Interfaces

Summary

The core interface for the whole system, that being a model. Implements basic functions and the id property.Those are all the required minimums for a Model, as well as using this interface it allows all models to be loaded by finding classes that implement this interface.

id property

Summary

The unique id for this model instance that all model based rest calls will use

ISecureSession type

Namespace

Org.Reddragonit.VueJSMVCDotNet.Interfaces

Summary

Used to pass around a user session within the handler and sub handler components.
Typically needed for security reasons, hnnce being names SecureSession

RequestHandler type

Namespace

Org.Reddragonit.VueJSMVCDotNet

Summary

This is the primary component for handling all requests within this library, and is therefore required to be created and passed web request appropriately

#ctor(startType,logWriter) constructor

Summary

Create an isntance of the Request Handler, specifying what to do on the start up and attaching a log writer if desired

Parameters
Name Type Description
startType T:Org.Reddragonit.VueJSMVCDotNet.RequestHandler.StartTypes The type of startup to use (either disable models or throw exception)
logWriter T:Org.Reddragonit.VueJSMVCDotNet.Interfaces.ILogWriter A log writer instance to write the log messages to

StartTypes.DisableInvalidModels constants

Summary

Disable any models that were found to be invalid

StartTypes.ThrowInvalidExceptions constants

Summary

Throw a contained exception that will list all the errors and the models associated with them.

Dispose method

Summary

Disposes of the request handler and cleans up the resources there in

HandlesRequest(context) method

Summary

Called to check if this class handles the given request

Parameters
Name Type Description
context T:Microsoft.AspNetCore.Http.HttpContext The context of the request

ProcessRequest(context,session) method

Summary

Called to handle a given request

Parameters
Name Type Description
context T:Microsoft.AspNetCore.Http.HttpContext The context of the request
session T:Org.Reddragonit.VueJSMVCDotNet.Interfaces.ISecureSession The security session associated with the request

UnloadAssemblyContext(context) method

Summary

called when an assemblyloadcontext needs to be unloaded, this will remove all references to that load context to allow for an unload

Parameters
Name Type Description
context T:System.Runtime.Loader.AssemblyLoadContext The assembly context being unloaded

UnloadAssemblyContext(contextName) method

Summary

called when an assembly context needs to be unloaded without providing the context but its name instead

Parameters
Name Type Description
contextName T:System.String The name of the assembly load context to unload

AssemblyAdded method

Summary

called when a new assembly has been loaded in the case of dynamic loading, in order to rescan for all new model types and add them accordingly.

AsssemblyLoadContextAdded(contextName) method

Summary

Called when a new Assembly Load Context has been added

Parameters
Name Type Description
contextName T:System.String The name of the context that was added

AsssemblyLoadContextAdded(alc) method

Summary

Called when a new Assembly Load Context has been added

Parameters
Name Type Description
alc T:System.Runtime.Loader.AssemblyLoadContext The assembly load context that was added

StartTypes type

Namespace

Org.Reddragonit.VueJSMVCDotNet.RequestHandler

Summary

how to startup the system as per their names, either disable invalid models or throw and exception about them

DisableInvalidModels constants

Summary

Disable any models that were found to be invalid

ThrowInvalidExceptions constants

Summary

Throw a contained exception that will list all the errors and the models associated with them.

Clone this wiki locally