本文整理汇总了C#中IceInternal.Instance.factoryAssemblies方法的典型用法代码示例。如果您正苦于以下问题:C# Instance.factoryAssemblies方法的具体用法?C# Instance.factoryAssemblies怎么用?C# Instance.factoryAssemblies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IceInternal.Instance
的用法示例。
在下文中一共展示了Instance.factoryAssemblies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: findType
public static Type findType(Instance instance, string csharpId)
{
lock(_mutex)
{
Type t;
if (_typeTable.TryGetValue(csharpId, out t))
{
return t;
}
#if COMPACT || SILVERLIGHT
string[] assemblies = instance.factoryAssemblies();
for(int i = 0; i < assemblies.Length; ++i)
{
string s = csharpId + "," + assemblies[i];
if((t = Type.GetType(s)) != null)
{
_typeTable[csharpId] = t;
return t;
}
}
//
// As a last resort, look for the type in the standard Ice assemblies.
// This avoids the need for a program to set a property such as:
//
// Ice.FactoryAssemblies=Ice
//
foreach(string a in _iceAssemblies)
{
string s = csharpId + "," + a;
if((t = Type.GetType(s)) != null)
{
_typeTable[csharpId] = t;
return t;
}
}
#else
loadAssemblies(); // Lazy initialization
foreach (Assembly a in _loadedAssemblies.Values)
{
if((t = a.GetType(csharpId)) != null)
{
_typeTable[csharpId] = t;
return t;
}
}
#endif
}
return null;
}