Esempio n. 1
0
        // --------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Allows controlling how this class member is exposed to the scripting environment.
        /// </summary>
        /// <param name="inScriptName">The type name to expose to the scripting environment for this member (default is null/empty, which means use the member name as is).</param>
        /// <param name="security">The script access security for this member.</param>
        public ScriptMember(string inScriptName = null, ScriptMemberSecurity security = ScriptMemberSecurity.ReadWrite)
        {
            InScriptName = inScriptName;
            Security     = security;
        }
Esempio n. 2
0
 /// <summary>
 /// Allows controlling how this class member is exposed to the scripting environment.
 /// </summary>
 /// <param name="security">The script access security for this member.</param>
 public ScriptMember(ScriptMemberSecurity security)
 {
     Security = security;
 }
Esempio n. 3
0
        // --------------------------------------------------------------------------------------------------------------------

        /// <summary>
        /// Allows specifying the default member access for all public members of this class at once.
        /// </summary>
        /// <param name="typeName">The function name to use when exposing a class to the scripting environment (default is null/empty, which means use the class name as is).</param>
        /// <param name="security">The global default access for all public class members (default is read/write).</param>
        public ScriptObject(string typeName = null, ScriptMemberSecurity security = ScriptMemberSecurity.ReadWrite)
        {
            TypeName = typeName;
            Security = security;
        }
Esempio n. 4
0
 /// <summary>
 /// Allows specifying the default member access for all public members of a class at once.
 /// </summary>
 /// <param name="security">The global default access for all public class members.</param>
 public ScriptObject(ScriptMemberSecurity security)
 {
     Security = security;
 }
Esempio n. 5
0
 /// <summary>
 /// Sets a property to a given object. If the object is not V8.NET related, then the system will attempt to bind the instance and all public members to
 /// the specified property name.
 /// Returns true if successful.
 /// </summary>
 /// <param name="name">The property name.</param>
 /// <param name="obj">Some value or object instance. 'Engine.CreateValue()' will be used to convert value types.</param>
 /// <param name="className">A custom in-script function name for the specified object type, or 'null' to use either the type name as is (the default) or any existing 'ScriptObject' attribute name.</param>
 /// <param name="recursive">For object instances, if true, then object reference members are included, otherwise only the object itself is bound and returned.
 /// For security reasons, public members that point to object instances will be ignored. This must be true to included those as well, effectively allowing
 /// in-script traversal of the object reference tree (so make sure this doesn't expose sensitive methods/properties/fields).</param>
 /// <param name="memberSecurity">For object instances, these are default flags that describe JavaScript properties for all object instance members that
 /// don't have any 'ScriptMember' attribute.  The flags should be 'OR'd together as needed.</param>
 public virtual bool SetProperty(string name, object obj, string className, bool? recursive, ScriptMemberSecurity? memberSecurity)
 {
     return HandleInternal.HandleInternal.SetProperty(name, obj, className, recursive, memberSecurity);
 }
Esempio n. 6
0
 /// <summary>
 /// Binds a 'V8Function' object to the specified type and associates the type name (or custom script name) with the underlying object.
 /// Returns true if successful.
 /// </summary>
 /// <param name="type">The type to wrap.</param>
 /// <param name="propertyAttributes">Flags that describe the property behavior.  They must be 'OR'd together as needed.</param>
 /// <param name="className">A custom in-script function name for the specified type, or 'null' to use either the type name as is (the default) or any existing 'ScriptObject' attribute name.</param>
 /// <param name="recursive">For object types, if true, then object reference members are included, otherwise only the object itself is bound and returned.
 /// For security reasons, public members that point to object instances will be ignored. This must be true to included those as well, effectively allowing
 /// in-script traversal of the object reference tree (so make sure this doesn't expose sensitive methods/properties/fields).</param>
 /// <param name="memberSecurity">For object instances, these are default flags that describe JavaScript properties for all object instance members that
 /// don't have any 'ScriptMember' attribute.  The flags should be 'OR'd together as needed.</param>
 public virtual bool SetProperty(Type type, V8PropertyAttributes propertyAttributes, string className, bool? recursive, ScriptMemberSecurity? memberSecurity)
 {
     return HandleInternal.HandleInternal.SetProperty(type, propertyAttributes, className, recursive, memberSecurity);
 }
Esempio n. 7
0
 // --------------------------------------------------------------------------------------------------------------------
 /// <summary>
 /// Allows controlling how this class member is exposed to the scripting environment.
 /// </summary>
 /// <param name="inScriptName">The type name to expose to the scripting environment for this member (default is null/empty, which means use the member name as is).</param>
 /// <param name="security">The script access security for this member.</param>
 public ScriptMember(string inScriptName = null, ScriptMemberSecurity security = ScriptMemberSecurity.ReadWrite)
 {
     InScriptName = inScriptName;
     Security = security;
 }
Esempio n. 8
0
 /// <summary>
 /// Allows controlling how this class member is exposed to the scripting environment.
 /// </summary>
 /// <param name="security">The script access security for this member.</param>
 public ScriptMember(ScriptMemberSecurity security)
 {
     Security = security;
 }
Esempio n. 9
0
 // --------------------------------------------------------------------------------------------------------------------
 /// <summary>
 /// Allows specifying the default member access for all public members of this class at once.
 /// </summary>
 /// <param name="typeName">The function name to use when exposing a class to the scripting environment (default is null/empty, which means use the class name as is).</param>
 /// <param name="security">The global default access for all public class members (default is read/write).</param>
 public ScriptObject(string typeName = null, ScriptMemberSecurity security = ScriptMemberSecurity.ReadWrite)
 {
     TypeName = typeName;
     Security = security;
 }
Esempio n. 10
0
 /// <summary>
 /// Allows specifying the default member access for all public members of a class at once.
 /// </summary>
 /// <param name="security">The global default access for all public class members.</param>
 public ScriptObject(ScriptMemberSecurity security)
 {
     Security = security;
 }
Esempio n. 11
0
 /// <summary>
 /// Binds a 'V8Function' object to the specified type and associates the type name (or custom script name) with the underlying object.
 /// Returns true if successful.
 /// </summary>
 /// <param name="type">The type to wrap.</param>
 /// <param name="propertyAttributes">Flags that describe the property behavior.  They must be 'OR'd together as needed.</param>
 /// <param name="className">A custom in-script function name for the specified type, or 'null' to use either the type name as is (the default) or any existing 'ScriptObject' attribute name.</param>
 /// <param name="recursive">For object types, if true, then object reference members are included, otherwise only the object itself is bound and returned.
 /// For security reasons, public members that point to object instances will be ignored. This must be true to included those as well, effectively allowing
 /// in-script traversal of the object reference tree (so make sure this doesn't expose sensitive methods/properties/fields).</param>
 /// <param name="memberSecurity">For object instances, these are default flags that describe JavaScript properties for all object instance members that
 /// don't have any 'ScriptMember' attribute.  The flags should be 'OR'd together as needed.</param>
 public virtual bool SetProperty(Type type, V8PropertyAttributes propertyAttributes = V8PropertyAttributes.None, string className = null, bool? recursive = null, ScriptMemberSecurity? memberSecurity = null)
 {
     return _Handle._Handle.SetProperty(type, propertyAttributes, className, recursive, memberSecurity);
 }
Esempio n. 12
0
 /// <summary>
 /// Sets a property to a given object. If the object is not V8.NET related, then the system will attempt to bind the instance and all public members to
 /// the specified property name.
 /// Returns true if successful.
 /// </summary>
 /// <param name="name">The property name.</param>
 /// <param name="obj">Some value or object instance. 'Engine.CreateValue()' will be used to convert value types.</param>
 /// <param name="className">A custom in-script function name for the specified object type, or 'null' to use either the type name as is (the default) or any existing 'ScriptObject' attribute name.</param>
 /// <param name="recursive">For object instances, if true, then object reference members are included, otherwise only the object itself is bound and returned.
 /// For security reasons, public members that point to object instances will be ignored. This must be true to included those as well, effectively allowing
 /// in-script traversal of the object reference tree (so make sure this doesn't expose sensitive methods/properties/fields).</param>
 /// <param name="memberSecurity">For object instances, these are default flags that describe JavaScript properties for all object instance members that
 /// don't have any 'ScriptMember' attribute.  The flags should be 'OR'd together as needed.</param>
 public virtual bool SetProperty(string name, object obj, string className = null, bool? recursive = null, ScriptMemberSecurity? memberSecurity = null)
 {
     return _Handle._Handle.SetProperty(name, obj, className, recursive, memberSecurity);
 }
Esempio n. 13
0
 /// <summary>
 /// Allows controlling how this class member is exposed to the scripting environment.
 /// </summary>
 /// <param name="inScriptName">The type name to expose to the scripting environment for this member (default is null/empty, which means use the member name as is).</param>
 /// <param name="security">The script access security for this member.</param>
 public ScriptMember(string inScriptName, ScriptMemberSecurity security)
 {
     InScriptName = inScriptName;
     Security = security;
 }
Esempio n. 14
0
 // --------------------------------------------------------------------------------------------------------------------
 /// <summary>
 /// Allows controlling how this class member is exposed to the scripting environment.
 /// </summary>
 /// <param name="inScriptName">The type name to expose to the scripting environment for this member (default is null/empty, which means use the member name as is).</param>
 /// <param name="security">The script access security for this member.</param>
 public ScriptMember(ScriptMemberSecurity security)
     : this(null, security)
 {
 }
Esempio n. 15
0
 /// <summary>
 /// Allows specifying the default member access for all public members of this class at once.
 /// </summary>
 /// <param name="typeName">The function name to use when exposing a class to the scripting environment (default is null/empty, which means use the class name as is).</param>
 /// <param name="security">The global default access for all public class members (default is read/write).</param>
 public ScriptObject(string typeName, ScriptMemberSecurity security)
 {
     TypeName = typeName;
     Security = security;
 }