Mono.CSharp.MetadataImporter.GetCustomAttributeTypeName C# (CSharp) Method

GetCustomAttributeTypeName() public abstract method

public abstract GetCustomAttributeTypeName ( CustomAttributeData cad, string &typeNamespace, string &typeName ) : void
cad CustomAttributeData
typeNamespace string
typeName string
return void
        public abstract void GetCustomAttributeTypeName(CustomAttributeData cad, out string typeNamespace, out string typeName);

Usage Example

示例#1
0
文件: import.cs 项目: wuzzeb/mono
			void ReadAttribute (MetadataImporter importer)
			{
				IList<CustomAttributeData> cad;
				if (provider is MemberInfo) {
					cad = CustomAttributeData.GetCustomAttributes ((MemberInfo) provider);
				} else if (provider is ParameterInfo) {
					cad = CustomAttributeData.GetCustomAttributes ((ParameterInfo) provider);
				} else {
					provider = null;
					return;
				}

				if (cad.Count > 0) {
					string ns, name;
					foreach (var ca in cad) {
						importer.GetCustomAttributeTypeName (ca, out ns, out name);
						if (name != "DynamicAttribute" && ns != CompilerServicesNamespace)
							continue;

						if (ca.ConstructorArguments.Count == 0) {
							flags = single_attribute;
							break;
						}

						var arg_type = ca.ConstructorArguments[0].ArgumentType;

						if (arg_type.IsArray && MetaType.GetTypeCode (arg_type.GetElementType ()) == TypeCode.Boolean) {
							var carg = (IList<CustomAttributeTypedArgument>) ca.ConstructorArguments[0].Value;
							flags = new bool[carg.Count];
							for (int i = 0; i < flags.Length; ++i) {
								if (MetaType.GetTypeCode (carg[i].ArgumentType) == TypeCode.Boolean)
									flags[i] = (bool) carg[i].Value;
							}

							break;
						}
					}
				}

				provider = null;
			}
All Usage Examples Of Mono.CSharp.MetadataImporter::GetCustomAttributeTypeName