當前位置: 首頁>>代碼示例>>C#>>正文


C# System.TypeExtension類代碼示例

本文整理匯總了C#中System.TypeExtension的典型用法代碼示例。如果您正苦於以下問題:C# TypeExtension類的具體用法?C# TypeExtension怎麽用?C# TypeExtension使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TypeExtension類屬於System命名空間,在下文中一共展示了TypeExtension類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetValue

		private static object GetValue(TypeExtension typeExtension, MemberAccessor member, string elemName, out bool isSet)
		{
			var value = typeExtension[member.Name][elemName].Value;

			isSet = value != null;

			return value;
		}
開發者ID:Gremlin2,項目名稱:bltoolkit,代碼行數:8,代碼來源:ExtensionMetadataProvider.cs

示例2: GetMapIgnore

		public virtual bool GetMapIgnore(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			isSet = false;

			return
				TypeHelper.IsScalar(member.Type) == false;// ||
				//(member.MemberInfo is FieldInfo && ((FieldInfo)member.MemberInfo).IsLiteral);
		}
開發者ID:sscctech,項目名稱:bltoolkit,代碼行數:8,代碼來源:MetadataProviderBase.cs

示例3: GetInheritanceDiscriminator

		public override bool GetInheritanceDiscriminator(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			var value = GetValue(typeExtension, member, "IsInheritanceDiscriminator", out isSet);

			if (value != null)
				return TypeExtension.ToBoolean(value);

			return base.GetInheritanceDiscriminator(typeExtension, member, out isSet);
		}
開發者ID:Gremlin2,項目名稱:bltoolkit,代碼行數:9,代碼來源:ExtensionMetadataProvider.cs

示例4: GetFieldStorage

		public override string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			var value = GetValue(typeExtension, member, "FieldStorage", out isSet);

			if (value != null)
				return value.ToString();

			return base.GetFieldStorage(typeExtension, member, out isSet);
		}
開發者ID:Gremlin2,項目名稱:bltoolkit,代碼行數:9,代碼來源:ExtensionMetadataProvider.cs

示例5: GetMapIgnore

		public override bool GetMapIgnore(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			var value = GetValue(typeExtension, member, "MapIgnore", out isSet);

			if (value != null)
				return TypeExtension.ToBoolean(value);

			return base.GetMapIgnore(typeExtension, member, out isSet) || GetAssociation(typeExtension, member) != null;
		}
開發者ID:Gremlin2,項目名稱:bltoolkit,代碼行數:9,代碼來源:ExtensionMetadataProvider.cs

示例6: GetFieldStorage

		public override string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			foreach (var p in _list)
			{
				var name = p.GetFieldStorage(typeExtension, member, out isSet);

				if (isSet)
					return name;
			}

			return base.GetFieldStorage(typeExtension, member, out isSet);
		}
開發者ID:starteleport,項目名稱:bltoolkit,代碼行數:12,代碼來源:MetadataProviderList.cs

示例7: GetInheritanceDiscriminator

		public override bool GetInheritanceDiscriminator(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			foreach (var p in _list)
			{
				var value = p.GetInheritanceDiscriminator(typeExtension, member, out isSet);

				if (isSet)
					return value;
			}

			return base.GetInheritanceDiscriminator(typeExtension, member, out isSet);
		}
開發者ID:starteleport,項目名稱:bltoolkit,代碼行數:12,代碼來源:MetadataProviderList.cs

示例8: GetFieldStorage

		public override string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			if (IsLinqObject(member.TypeAccessor.Type))
			{
				var a = member.GetAttribute<ColumnAttribute>();

				if (a != null && !string.IsNullOrEmpty(a.Name))
				{
					isSet = true;
					return a.Storage;
				}
			}

			return base.GetFieldStorage(typeExtension, member, out isSet);
		}
開發者ID:MajidSafari,項目名稱:bltoolkit,代碼行數:15,代碼來源:LinqMetadataProvider.cs

示例9: GetFieldStorage

		public override string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			var a = member.GetAttribute<MapFieldAttribute>();

			if (a != null)
			{
				isSet = true;
				return a.Storage;
			}

			foreach (MapFieldAttribute attr in GetMapFieldAttributes(member.TypeAccessor))
			{
				if (string.Equals(attr.OrigName, member.Name, StringComparison.InvariantCultureIgnoreCase))
				{
					isSet = true;
					return attr.Storage;
				}
			}

			return base.GetFieldStorage(typeExtension, member, out isSet);
		}
開發者ID:ivanoffalex,項目名稱:bltoolkit,代碼行數:21,代碼來源:AttributeMetadataProvider.cs

示例10: GetFieldStorage

		public virtual string GetFieldStorage(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			isSet = false;
			return null;
		}
開發者ID:sscctech,項目名稱:bltoolkit,代碼行數:5,代碼來源:MetadataProviderBase.cs

示例11: GetFieldName

		public virtual string GetFieldName(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			isSet = false;
			return member.Name;
		}
開發者ID:sscctech,項目名稱:bltoolkit,代碼行數:5,代碼來源:MetadataProviderBase.cs

示例12: GetInheritanceMapping

		public virtual InheritanceMappingAttribute[] GetInheritanceMapping(Type type, TypeExtension typeExtension)
		{
			return Array<InheritanceMappingAttribute>.Empty;
		}
開發者ID:sscctech,項目名稱:bltoolkit,代碼行數:4,代碼來源:MetadataProviderBase.cs

示例13: GetAssociation

		public virtual Association GetAssociation(TypeExtension typeExtension, MemberAccessor member)
		{
			return null;
		}
開發者ID:sscctech,項目名稱:bltoolkit,代碼行數:4,代碼來源:MetadataProviderBase.cs

示例14: GetPrimaryKeyFields

		protected static List<string> GetPrimaryKeyFields(MappingSchema schema, TypeAccessor ta, TypeExtension tex)
		{
			var mdp  = schema.MetadataProvider;
			var keys = new List<string>();

			foreach (MemberAccessor sma in ta)
			{
				bool isSetFlag;

				mdp.GetPrimaryKeyOrder(ta.Type, tex, sma, out isSetFlag);

				if (isSetFlag)
				{
					var name = mdp.GetFieldName(tex, sma, out isSetFlag);
					keys.Add(name);
				}
			}

			return keys;
		}
開發者ID:sscctech,項目名稱:bltoolkit,代碼行數:20,代碼來源:MetadataProviderBase.cs

示例15: GetSqlIgnore

		public virtual bool GetSqlIgnore(TypeExtension typeExtension, MemberAccessor member, out bool isSet)
		{
			isSet = false;
			return false;
		}
開發者ID:sscctech,項目名稱:bltoolkit,代碼行數:5,代碼來源:MetadataProviderBase.cs


注:本文中的System.TypeExtension類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。