9using System.Collections.Generic;
21 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple =
false)]
27 if (result !=
null && result.Length > 0)
159 string factoryType,
string createMethod,
string fetchMethod,
string updateMethod,
string deleteMethod)
191 string factoryType,
string createMethod,
string fetchMethod,
string updateMethod,
string deleteMethod,
string executeMethod)
208 : this(GetAssemblyQualifiedName(factoryType))
221 : this(GetAssemblyQualifiedName(factoryType), fetchMethod)
237 : this(GetAssemblyQualifiedName(factoryType), createMethod, fetchMethod)
258 public ObjectFactoryAttribute(Type factoryType,
string createMethod,
string fetchMethod,
string updateMethod,
string deleteMethod)
259 : this(GetAssemblyQualifiedName(factoryType), createMethod, fetchMethod, updateMethod, deleteMethod)
283 public ObjectFactoryAttribute(Type factoryType,
string createMethod,
string fetchMethod,
string updateMethod,
string deleteMethod,
string executeMethod)
284 : this(GetAssemblyQualifiedName(factoryType), createMethod, fetchMethod, updateMethod, deleteMethod, executeMethod)
292 private static string GetAssemblyQualifiedName(Type type)
295 if (type.IsGenericType())
297 if (type.IsGenericType)
300 return type.AssemblyQualifiedName;
304 if (type.AssemblyQualifiedName ==
null)
return string.Empty;
306 var elements = type.AssemblyQualifiedName.Split(
',');
307 return string.Format(
"{0},{1}", elements[0], elements[1]);
Specifies that the data portal should invoke a factory object rather than the business object.
ObjectFactoryAttribute(string factoryType, string fetchMethod)
Creates an instance of the attribute.
string FetchMethodName
Name of the method to call for a fetch operation.
string DeleteMethodName
Name of the method to call for a delete operation.
ObjectFactoryAttribute(Type factoryType)
Creates an instance of the attribute.
ObjectFactoryAttribute(Type factoryType, string createMethod, string fetchMethod, string updateMethod, string deleteMethod, string executeMethod)
Creates an instance of the attribute.
ObjectFactoryAttribute(Type factoryType, string createMethod, string fetchMethod)
Creates an instance of the attribute.
ObjectFactoryAttribute(string factoryType, string createMethod, string fetchMethod, string updateMethod, string deleteMethod)
Creates an instance of the attribute.
ObjectFactoryAttribute(string factoryType, string createMethod, string fetchMethod)
Creates an instance of the attribute.
ObjectFactoryAttribute(string factoryType)
Creates an instance of the attribute.
ObjectFactoryAttribute(Type factoryType, string fetchMethod)
Creates an instance of the attribute.
ObjectFactoryAttribute(Type factoryType, string createMethod, string fetchMethod, string updateMethod, string deleteMethod)
Creates an instance of the attribute.
string ExecuteMethodName
Name of the method to call for a Execute operation.
string UpdateMethodName
Name of the method to call for a update operation.
ObjectFactoryAttribute(string factoryType, string createMethod, string fetchMethod, string updateMethod, string deleteMethod, string executeMethod)
Creates an instance of the attribute.
string CreateMethodName
Name of the method to call for a create operation.
string FactoryTypeName
Assembly qualified type name of the factory object.