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(bool) 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, Formatting?, 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.