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


C# SimpleValue.AddFormula方法代碼示例

本文整理匯總了C#中NHibernate.Mapping.SimpleValue.AddFormula方法的典型用法代碼示例。如果您正苦於以下問題:C# SimpleValue.AddFormula方法的具體用法?C# SimpleValue.AddFormula怎麽用?C# SimpleValue.AddFormula使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在NHibernate.Mapping.SimpleValue的用法示例。


在下文中一共展示了SimpleValue.AddFormula方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: BindSimpleValue

		private void BindSimpleValue(HbmDiscriminator discriminatorSchema, SimpleValue discriminator)
		{
			if (discriminatorSchema.type != null)
				discriminator.TypeName = discriminatorSchema.type;

			if (discriminatorSchema.formula != null)
			{
				var f = new Formula {FormulaString = discriminatorSchema.formula};
				discriminator.AddFormula(f);
			}
			else
			{
				new ColumnsBinder(discriminator, Mappings).Bind(discriminatorSchema.Columns, false,
				                                                () =>
				                                                new HbmColumn
				                                                	{
				                                                		name =
				                                                			mappings.NamingStrategy.PropertyToColumnName(
				                                                			RootClass.DefaultDiscriminatorColumnName),
				                                                		length = discriminatorSchema.length,
																														notnull = discriminatorSchema.notnull,
																														notnullSpecified = true
				                                                	});
			}
		}
開發者ID:jlevitt,項目名稱:nhibernate-core,代碼行數:25,代碼來源:ClassDiscriminatorBinder.cs

示例2: BindSimpleValue

		private void BindSimpleValue(HbmDiscriminator discriminatorSchema, SimpleValue discriminator)
		{
			if (discriminatorSchema.type != null)
				discriminator.TypeName = discriminatorSchema.type;

			if (discriminatorSchema.formula != null)
			{
				Formula f = new Formula();
				f.FormulaString = discriminatorSchema.formula;
				discriminator.AddFormula(f);
			}
			else
				BindColumns(discriminatorSchema, discriminator);
		}
開發者ID:hazzik,項目名稱:nh-contrib-everything,代碼行數:14,代碼來源:ClassDiscriminatorBinder.cs

示例3: BindColumnsOrFormula

 private void BindColumnsOrFormula(XmlNode node, SimpleValue simpleValue, string path, bool isNullable)
 {
     XmlAttribute formulaNode = node.Attributes["formula"];
     if (formulaNode != null)
     {
         Formula f = new Formula();
         f.FormulaString = formulaNode.InnerText;
         simpleValue.AddFormula(f);
     }
     else
         BindColumns(node, simpleValue, isNullable, true, path);
 }
開發者ID:aistrate,項目名稱:TypingPracticeTexts,代碼行數:12,代碼來源:ClassBinder.cs

示例4: linkWithValue

 public void linkWithValue(SimpleValue value)
 {
     if (formula != null)
     {
         value.AddFormula(formula);
     }
     else
     {
         MappingColumn.Value = value;
         value.AddColumn(MappingColumn);
         value.Table.AddColumn(MappingColumn);
         AddColumnBinding(value);
         table = value.Table;
     }
 }
開發者ID:hazzik,項目名稱:nh-contrib-everything,代碼行數:15,代碼來源:Ejb3Column.cs

示例5: BindColumnsOrFormula

		private void BindColumnsOrFormula(XmlNode node, SimpleValue simpleValue, string path, bool isNullable)
		{
			var formula = GetFormula(node);
			if (formula != null)
			{
				var f = new Formula { FormulaString = formula };
				simpleValue.AddFormula(f);
			}
			else
				BindColumns(node, simpleValue, isNullable, true, path);
		}
開發者ID:nkmajeti,項目名稱:nhibernate,代碼行數:11,代碼來源:ClassBinder.cs

示例6: BindSimpleValue

		//automatically makes a column with the default name if none is specifed by XML
		public static void BindSimpleValue(XmlNode node, SimpleValue model, bool isNullable, string path, Mappings mappings)
		{
			model.Type = GetTypeFromXML(node);

			XmlAttribute formulaNode = node.Attributes["formula"];
			if (formulaNode != null)
			{
				Formula f = new Formula();
				f.FormulaString = formulaNode.InnerText;
				model.AddFormula(f);
			}
			else
			{
				BindColumns(node, model, isNullable, true, path, mappings);
			}

			XmlAttribute fkNode = node.Attributes["foreign-key"];
			if (fkNode != null)
			{
				model.ForeignKeyName = fkNode.Value;
			}
		}
開發者ID:Novthirteen,項目名稱:sconit_timesseiko,代碼行數:23,代碼來源:HbmBinder.cs


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