Monobjc.Class.GetAttributeName C# (CSharp) Method

GetAttributeName() static private method

Gets the name of the ObjectiveCClassAttribute instance for the given type.
static private GetAttributeName ( Type type ) : String
type System.Type The type that has a .
return String
        internal static String GetAttributeName (Type type)
		{
			ObjectiveCClassAttribute attribute = Attribute.GetCustomAttribute (type, typeof(ObjectiveCClassAttribute)) as ObjectiveCClassAttribute;
			if (attribute == null) {
				throw new ObjectiveCException (String.Format (CultureInfo.CurrentCulture, Resources.NoClassAttributeFoundForType, type));
			}
			String name = String.IsNullOrEmpty (attribute.Name) ? type.Name : attribute.Name;

            // Native types are never mangled
            if (attribute.IsNative) {
                return name;
            }

            // Managed types other than the primary require the domain token
            return ObjectiveCRuntime.GetDomainManagledName(name);
		}