本文整理汇总了C#中ISet.CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C# ISet.CopyTo方法的具体用法?C# ISet.CopyTo怎么用?C# ISet.CopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISet
的用法示例。
在下文中一共展示了ISet.CopyTo方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PostInstantiate
public void PostInstantiate(System.Type persistentClass, ISet interfaces,
MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod)
{
_persistentClass = persistentClass;
_interfaces = new System.Type[interfaces.Count];
interfaces.CopyTo(_interfaces, 0);
_getIdentifierMethod = getIdentifierMethod;
_setIdentifierMethod = setIdentifierMethod;
}
示例2: PostInstantiate
public virtual void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces,
MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod,
IAbstractComponentType componentIdType)
{
_entityName = entityName;
_persistentClass = persistentClass;
_interfaces = new System.Type[interfaces.Count];
interfaces.CopyTo(_interfaces, 0);
_getIdentifierMethod = getIdentifierMethod;
_setIdentifierMethod = setIdentifierMethod;
_componentIdType = componentIdType;
}
示例3: PostInstantiate
public void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces, MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, IAbstractComponentType componentIdType)
{
if (persistentClass.IsGenericType) return;
var interfacesCount = interfaces.Count;
var ifaces = new System.Type[interfacesCount];
if (interfacesCount > 0)
interfaces.CopyTo(ifaces, 0);
var proxyType = ifaces.Length == 1
? factory.CreateProxyType(persistentClass, ifaces)
: factory.CreateProxyType(ifaces[0], ifaces);
proxies[entityName] = proxyType;
}
示例4: PostInstantiate
public virtual void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces,
MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod,
IAbstractComponentType componentIdType)
{
EntityName = entityName;
PersistentClass = persistentClass;
Interfaces = new System.Type[interfaces.Count];
if (interfaces.Count > 0)
{
interfaces.CopyTo(Interfaces, 0);
}
GetIdentifierMethod = getIdentifierMethod;
SetIdentifierMethod = setIdentifierMethod;
ComponentIdType = componentIdType;
}
示例5: PostInstantiate
public void PostInstantiate(string entityName, Type persistentClass, ISet<Type> interfaces, MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, IAbstractComponentType componentIdType)
{
if (persistentClass.IsGenericType) return;
int interfacesCount = interfaces.Count;
bool isClassProxy = interfacesCount == 1;
Type[] ifaces = new Type[interfacesCount];
interfaces.CopyTo(ifaces, 0);
Type proxyType;
if (isClassProxy)
{
proxyType = _proxyBuilder.CreateClassProxy(persistentClass, ifaces, ProxyGenerationOptions.Default);
}
else
{
proxyType = _proxyBuilder.CreateInterfaceProxyTypeWithoutTarget(ifaces[0], ifaces, ProxyGenerationOptions.Default);
}
_proxies[entityName] = proxyType;
}
示例6: PostInstantiate
public void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces, MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod, IAbstractComponentType componentIdType)
{
_entityName = entityName;
_persistentClass = persistentClass;
_interfaces = new System.Type[interfaces.Count];
interfaces.CopyTo(_interfaces, 0);
_getIdentifierMethod = getIdentifierMethod;
_setIdentifierMethod = setIdentifierMethod;
_componentIdType = componentIdType;
_isClassProxy = _interfaces.Length == 1;
_proxyKey = entityName;
if (!_proxies.TryGetValue(_proxyKey, out _proxyType))
{
var message = string.Format("No proxy type found for persistent class '{0}' using proxy key '{1}'", _persistentClass.FullName, _proxyKey);
_log.Error(message);
throw new HibernateException(message);
}
_log.DebugFormat("Using proxy type '{0}' for persistent class '{1}'", _proxyType.Name, _persistentClass.FullName);
}