WeavyContext Class


Encapsulates thread specific data used by Weavy.

public class WeavyContext
System.Object → WeavyContext


ApplicationDirectory Gets the root directory of the application, e.g. "C:\inetpub\weavy\".
ApplicationPath Gets the application's virtual application root path on the server, e.g. "/" or "/vdir/".
ApplicationUrl Gets the absolute url to the application, e.g. "http://weavy.example.com:8080/vdir/".
Current Gets the WeavyContext object for the current request/thread.
HQ Gets the "Company HQ".
License Gets the currently configured license.
System Gets the System space.
Uri Gets the absolute Uri to the application, e.g. http://weavy.example.com or https://www.example.com/weavy.
User Gets or sets the User associated with the current request/thread. When actions/methods require certain permissions, they are always evaluated against this user.


Copy(Boolean) Creates a copy of the current context.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(Object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(Object, Nullable, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.