/// <summary> /// <p>Creates a new instance of ObjectDefinition.</p> /// </summary> /// /// <param name="appDomain">The application domain (can be null or empty).</param> /// <param name="assembly">The assembly name (can be null if appDomain is null or empty).</param> /// <param name="typeName">The type name (cannot be null).</param> /// <param name="ignoreCase"> /// False for case sensitive lookup, true for case insensitive lookup of the static method name. /// </param> /// <param name="paramTypes"> /// The types of the parameters (can be null or empty). /// </param> /// <param name="paramValues"> /// The values of the parameters (can be null or empty). /// </param> /// <param name="methodCalls"> /// The method calls definitions to be made on the object after it is create (can be null). /// </param> /// <param name="instantiationLifetime"> /// InstantiationLifetime value stating the length of the lifetime of this instance. /// </param> /// <param name="methodName">The name of the static method to use to create the object.</param> /// /// <exception cref="ArgumentNullException"> /// If typeName or methodName is null or an array element (besides an element in paramValues /// corresponding to a paramType of "null") is null. /// </exception> /// <exception cref="ArgumentException"> /// If the paramTypes and paramValues arrays don't have the same size and aren't both null or /// if paramTypes has invalid values (see ParamTypes), or assembly is the empty string /// or instantiationLifetime is invalid or methodName is empty. /// </exception> public ObjectDefinition(string appDomain, string assembly, string typeName, string methodName, bool ignoreCase, string[] paramTypes, object[] paramValues, MethodCallDefinition[] methodCalls, InstantiationLifetime instantiationLifetime) : this(appDomain, assembly, typeName, methodName, ignoreCase, instantiationLifetime, paramTypes, paramValues, methodCalls) { Helper.ValidateNotNull(methodName, "methodName"); isStatic = true; }
/// <summary> /// <p>Creates a new instance of ObjectDefinition.</p> /// </summary> /// /// <p> /// Version 1.2: Move part of parameter verification to property setter. /// </p> /// /// <param name="appDomain">The application domain (can be null or empty).</param> /// <param name="assembly">The assembly name (can be null if appDomain is null or empty).</param> /// <param name="typeName">The type name (cannot be null).</param> /// <param name="ignoreCase"> /// False for case sensitive lookup, true for case insensitive lookup of the static method name. /// </param> /// <param name="paramTypes"> /// The types of the parameters (can be null or empty). /// </param> /// <param name="paramValues"> /// The values of the parameters (can be null or empty). /// </param> /// <param name="methodCalls"> /// The method calls definitions to be made on the object after it is create (can be null). /// </param> /// <param name="instantiationLifetime"> /// InstantiationLifetime value stating the length of the lifetime of this instance. /// </param> /// <param name="methodName">The name of the static method to use to create the object.</param> /// /// <exception cref="ArgumentNullException"> /// If typeName or methodName is null or an array element (besides an element in paramValues /// corresponding to a paramType of "null") is null. /// </exception> /// <exception cref="ArgumentException"> /// If the paramTypes and paramValues arrays don't have the same size and aren't both null or /// if paramTypes has invalid values (see ParamTypes), or assembly is the empty string /// or instantiationLifetime is invalid or methodName is empty. /// </exception> /// <since>1.1</since> private ObjectDefinition(string appDomain, string assembly, string typeName, string methodName, bool ignoreCase, InstantiationLifetime instantiationLifetime, string[] paramTypes, object[] paramValues, MethodCallDefinition[] methodCalls) : base(ignoreCase, paramTypes, paramValues, methodName) { this.AppDomain = appDomain; this.Assembly = assembly; this.TypeName = typeName; this.InstantiationLifetime = instantiationLifetime; this.MethodCalls = methodCalls; }
/// <summary> /// <p>Creates a new instance of ObjectDefinition.</p> /// </summary> /// /// <param name="appDomain">The application domain (can be null or empty).</param> /// <param name="assembly">The assembly name (can be null if appDomain is null or empty).</param> /// <param name="typeName">The type name (cannot be null).</param> /// <param name="ignoreCase"> /// False for case sensitive lookup, true for case insensitive lookup of the static method name. /// </param> /// <param name="paramTypes"> /// The types of the parameters (can be null or empty). /// </param> /// <param name="paramValues"> /// The values of the parameters (can be null or empty). /// </param> /// <param name="methodCalls"> /// The method calls definitions to be made on the object after it is create (can be null). /// </param> /// <param name="instantiationLifetime"> /// InstantiationLifetime value stating the length of the lifetime of this instance. /// </param> /// /// <exception cref="ArgumentNullException"> /// If typeName is null or an array element (besides an element in paramValues corresponding /// to a paramType of "null") is null. /// </exception> /// <exception cref="ArgumentException"> /// If the paramTypes and paramValues arrays don't have the same size and aren't both null or /// if paramTypes has invalid values (see ParamTypes), or assembly is the empty string /// or instantiationLifetime is invalid. /// </exception> public ObjectDefinition(string appDomain, string assembly, string typeName, bool ignoreCase, string[] paramTypes, object[] paramValues, MethodCallDefinition[] methodCalls, InstantiationLifetime instantiationLifetime) : this(appDomain, assembly, typeName, null, ignoreCase, instantiationLifetime, paramTypes, paramValues, methodCalls) { isStatic = false; }