Show / Hide Table of Contents

Class DefaultRegistrationPolicy

The default registration policy used by MoonSharp unless explicitely replaced. Deregistrations are allowed, but registration of a new descriptor are not allowed if a descriptor is already registered for that type.

Automatic type registration is disabled.

Inheritance
System.Object
DefaultRegistrationPolicy
AutomaticRegistrationPolicy
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class DefaultRegistrationPolicy : IRegistrationPolicy

Methods

AllowTypeAutoRegistration(Type)

Allows type automatic registration for the specified type. NOTE: automatic type registration is NOT recommended.

Declaration
public virtual bool AllowTypeAutoRegistration(Type type)
Parameters
Type type

The type.

Returns
System.Boolean

True to register the type automatically, false otherwise.

Implements
IRegistrationPolicy.AllowTypeAutoRegistration(Type)

HandleRegistration(IUserDataDescriptor, IUserDataDescriptor)

Called to handle the registration or deregistration of a type descriptor. Must return the type descriptor to be registered, or null to remove the registration.

Declaration
public IUserDataDescriptor HandleRegistration(IUserDataDescriptor newDescriptor, IUserDataDescriptor oldDescriptor)
Parameters
IUserDataDescriptor newDescriptor

The new descriptor, or null if this is a deregistration.

IUserDataDescriptor oldDescriptor

The old descriptor, or null if no descriptor was previously registered for this type.

Returns
IUserDataDescriptor

Implements
IRegistrationPolicy.HandleRegistration(IUserDataDescriptor, IUserDataDescriptor)
Back to top Built by Itinero, MIT licensed.