Mono.Linker.LinkContext.GetType C# (CSharp) Метод

GetType() публичный Метод

public GetType ( string fullName ) : Mono.Cecil.TypeDefinition
fullName string
Результат Mono.Cecil.TypeDefinition
		public TypeDefinition GetType (string fullName)
		{
			int pos = fullName.IndexOf (",");
			fullName = fullName.Replace ("+", "/");
			if (pos == -1) {
				foreach (AssemblyDefinition asm in GetAssemblies ()) {
					var type = asm.MainModule.GetType (fullName);
					if (type != null)
						return type;
				}

				return null;
			}

			string asmname = fullName.Substring (pos + 1);
			fullName = fullName.Substring (0, pos);
			AssemblyDefinition assembly = Resolve (AssemblyNameReference.Parse (asmname));
			return assembly.MainModule.GetType (fullName);
		}

Usage Example

Пример #1
0
        void OnInterface(XPathNavigator nav)
        {
            string name = GetName(nav);

            TypeDefinition type = _context.GetType(GetTypeName(name));

            if (type != null)
            {
                _visitor.OnInterface(nav, type);
            }
        }
All Usage Examples Of Mono.Linker.LinkContext::GetType