当前位置: 首页>>代码示例>>C#>>正文


C# ILoadable类代码示例

本文整理汇总了C#中ILoadable的典型用法代码示例。如果您正苦于以下问题:C# ILoadable类的具体用法?C# ILoadable怎么用?C# ILoadable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ILoadable类属于命名空间,在下文中一共展示了ILoadable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ThrowIfTargetNotLoadable

 private void ThrowIfTargetNotLoadable(ILoadable target)
 {
     if(target == null)
     {
         throw new InterceptionTypeNotLoadableException();
     }
 }
开发者ID:akoeplinger,项目名称:YouTrack.Rest,代码行数:7,代码来源:LoadableProxyInterceptor.cs

示例2: InitProjection

		protected void InitProjection(SqlString projectionString, SqlString whereString,
			string orderByString, string groupByString, LockMode lockMode)
		{
			WalkEntityTree(persister, Alias);
			Persisters = new ILoadable[0];
			InitStatementString(projectionString, whereString, orderByString, groupByString, lockMode);
		}
开发者ID:pallmall,项目名称:WCell,代码行数:7,代码来源:AbstractEntityJoinWalker.cs

示例3: DefaultEntityAliases

		/// <summary>
		/// Calculate and cache select-clause suffixes.
		/// </summary>
		public DefaultEntityAliases(IDictionary<string, string[]> userProvidedAliases, ILoadable persister, string suffix)
		{
			this.suffix = suffix;
			this.userProvidedAliases = userProvidedAliases;

			string[] keyColumnsCandidates = GetUserProvidedAliases(persister.IdentifierPropertyName, null);
			if (keyColumnsCandidates == null)
			{
				suffixedKeyColumns = GetUserProvidedAliases(EntityPersister.EntityID, GetIdentifierAliases(persister, suffix));
			}
			else
			{
				suffixedKeyColumns = keyColumnsCandidates;
			}
			Intern(suffixedKeyColumns);

			suffixedPropertyColumns = GetSuffixedPropertyAliases(persister);
			suffixedDiscriminatorColumn =
				GetUserProvidedAlias(AbstractEntityPersister.EntityClass, GetDiscriminatorAlias(persister, suffix));
			if (persister.IsVersioned)
			{
				suffixedVersionColumn = suffixedPropertyColumns[persister.VersionProperty];
			}
			else
			{
				suffixedVersionColumn = null;
			}
			rowIdAlias = Loadable.RowIdAlias + suffix; // TODO: not visible to the user!
		}
开发者ID:jlevitt,项目名称:nhibernate-core,代码行数:32,代码来源:DefaultEntityAliases.cs

示例4: SimpleEntityLoader

		public SimpleEntityLoader( ILoadable persister, SqlString sql, LockMode lockMode )
		{
			this.persister = new ILoadable[ ] {persister};
			this.idType = persister.IdentifierType;
			this.sql = sql;
			this.lockMode = new LockMode[ ] {lockMode};
			PostInstantiate();
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:8,代码来源:SimpleEntityLoader.cs

示例5: RenderStatement

		private void RenderStatement( ILoadable[ ] persisters )
		{
			int loadables = persisters.Length;

			Persisters = persisters;
			Suffixes = GenerateSuffixes( loadables );
			lockModeArray = CreateLockModeArray( loadables, LockMode.None );

			SqlString = SubstituteParams( SubstituteBrackets() );
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:10,代码来源:SqlLoader.cs

示例6: SubselectFetch

		public SubselectFetch(string alias, ILoadable loadable, QueryParameters queryParameters,
		                      ISet<EntityKey> resultingEntityKeys)
		{
			this.resultingEntityKeys = resultingEntityKeys;
			this.queryParameters = queryParameters;
			this.loadable = loadable;
			this.alias = alias;

			queryString = queryParameters.ProcessedSql.GetSubselectString();
		}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:10,代码来源:SubselectFetch.cs

示例7: InitClassPersisters

		protected void InitClassPersisters( IList associations )
		{
			int joins = CountClassPersisters( associations );

			collectionOwner = -1; // if no collection found
			classPersisters = new ILoadable[ joins + 1 ];
			Owners = new int[ joins + 1 ];
			aliases = new string[ joins + 1 ];
			lockModeArray = CreateLockModeArray( joins + 1, LockMode.None );
			int i = 0;
			foreach( OuterJoinableAssociation oj in associations )
			{
				object subpersister = oj.Joinable;
				if( subpersister is ILoadable )
				{
					classPersisters[ i ] = ( ILoadable ) subpersister;
					Owners[ i ] = ToOwner( oj, joins, oj.IsOneToOne );
					aliases[ i ] = oj.Subalias;
					if( oj.JoinType == JoinType.InnerJoin )
					{
						AddAllToPropertySpaces( classPersisters[ i ].PropertySpaces );
					}
					i++;
				}
				else
				{
					IQueryableCollection collPersister = ( IQueryableCollection ) subpersister;
					// TODO: ?? suppress initialization of collections with a where condition
					if( oj.JoinType == JoinType.LeftOuterJoin )
					{
						collectionPersister = collPersister;
						collectionOwner = ToOwner( oj, joins, true );
					}
					else
					{
						AddToPropertySpaces( collPersister.CollectionSpace );
					}

					if( collPersister.IsOneToMany )
					{
						classPersisters[ i ] = ( ILoadable ) collPersister.ElementPersister;
						aliases[ i ] = oj.Subalias;
						i++;
					}
				}
			}
			classPersisters[ joins ] = persister;
			Owners[ joins ] = -1;
			aliases[ joins ] = alias;

			if( ArrayHelper.IsAllNegative( Owners ) )
			{
				Owners = null;
			}
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:55,代码来源:AbstractEntityLoader.cs

示例8: SubselectFetch

		public SubselectFetch(string alias, ILoadable loadable, QueryParameters queryParameters,
		                      ISet<EntityKey> resultingEntityKeys, IDictionary<string, int[]> namedParameterLocMap)
		{
			this.resultingEntityKeys = resultingEntityKeys;
			this.queryParameters = queryParameters;
			this.namedParameterLocMap = namedParameterLocMap;
			this.loadable = loadable;
			this.alias = alias;

			queryString = queryParameters.FilteredSQL.GetSubselectString();
		}
开发者ID:Mrding,项目名称:Ribbon,代码行数:11,代码来源:SubselectFetch.cs

示例9: InitProjection

		protected void InitProjection(CriteriaQueryTranslator translator, 
			IDictionary<string, IFilter> enabledFilters, LockMode lockMode)
		{
			// the order of the calls here is important, as the join clauses can contain parameter bindings
			SqlString projectionString = translator.GetSelect(enabledFilters);
			WalkEntityTree(persister, Alias);
			SqlString whereString = translator.GetWhereCondition(enabledFilters);
			SqlString orderByString = translator.GetOrderBy();
			SqlString groupByString = translator.GetGroupBy();
			SqlString havingString = translator.GetHavingCondition(enabledFilters);
			
			Persisters = new ILoadable[0];
			InitStatementString(projectionString, whereString, orderByString, groupByString.ToString(), 
                havingString, lockMode);
		}
开发者ID:renefc3,项目名称:nhibernate,代码行数:15,代码来源:AbstractEntityJoinWalker.cs

示例10: InitClassPersisters

		private void InitClassPersisters( IList associations )
		{
			int joins = associations.Count;
			lockModeArray = CreateLockModeArray( joins, LockMode.None );

			classPersisters = new ILoadable[joins];
			Owners = new int[joins];

			int i = 0;
			foreach( OuterJoinableAssociation oj in associations )
			{
				classPersisters[ i ] = ( ILoadable ) oj.Joinable;
				Owners[ i ] = ToOwner( oj, joins, oj.IsOneToOne );
				i++;
			}

			if( ArrayHelper.IsAllNegative( Owners ) )
			{
				Owners = null;
			}
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:21,代码来源:CollectionLoader.cs

示例11: InitClassPersisters

		private void InitClassPersisters( IOuterJoinLoadable persister, IList associations )
		{
			int joins = associations.Count;
			lockModeArray = CreateLockModeArray( joins + 1, LockMode.None );

			classPersisters = new ILoadable[joins + 1];
			Owners = new int[ joins + 1 ];
			for( int i = 0; i < joins; i++ )
			{
				OuterJoinableAssociation oj = ( OuterJoinableAssociation ) associations[ i ];
				Persisters[ i ] = (ILoadable) oj.Joinable;
				Owners[ i ] = ToOwner( oj, joins, oj.IsOneToOne );
			}
			classPersisters[ joins ] = persister;
			Owners[ joins ] = -1;

			if ( ArrayHelper.IsAllNegative( Owners ) )
			{
				Owners = null;
			}
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:21,代码来源:OneToManyLoader.cs

示例12: GenerateSequentialSelect

		private SqlString GenerateSequentialSelect(ILoadable persister)
		{
			//note that this method could easily be moved up to BasicEntityPersister,
			//if we ever needed to reuse it from other subclasses

			//figure out which tables need to be fetched
			AbstractEntityPersister subclassPersister = (AbstractEntityPersister)persister;
			HashedSet<int> tableNumbers = new HashedSet<int>();
			string[] props = subclassPersister.PropertyNames;
			string[] classes = subclassPersister.PropertySubclassNames;
			for (int i = 0; i < props.Length; i++)
			{
				int propTableNumber = GetSubclassPropertyTableNumber(props[i], classes[i]);
				if (IsSubclassTableSequentialSelect(propTableNumber) && !IsSubclassTableLazy(propTableNumber))
				{
					tableNumbers.Add(propTableNumber);
				}
			}
			if ((tableNumbers.Count == 0))
				return null;

			//figure out which columns are needed
			List<int> columnNumbers = new List<int>();
			int[] columnTableNumbers = SubclassColumnTableNumberClosure;
			for (int i = 0; i < SubclassColumnClosure.Length; i++)
			{
				if (tableNumbers.Contains(columnTableNumbers[i]))
					columnNumbers.Add(i);
			}

			//figure out which formulas are needed
			List<int> formulaNumbers = new List<int>();
			int[] formulaTableNumbers = SubclassColumnTableNumberClosure;
			for (int i = 0; i < SubclassFormulaTemplateClosure.Length; i++)
			{
				if (tableNumbers.Contains(formulaTableNumbers[i]))
					formulaNumbers.Add(i);
			}

			//render the SQL
			return RenderSelect(ArrayHelper.ToIntArray(tableNumbers), columnNumbers.ToArray(), formulaNumbers.ToArray());
		}
开发者ID:juanplopes,项目名称:nhibernate,代码行数:42,代码来源:SingleTableEntityPersister.cs

示例13: GetPropertyAliases

		protected override string[] GetPropertyAliases(ILoadable persister, int j)
		{
			return persister.GetPropertyColumnNames(j);
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:4,代码来源:ColumnEntityAliases.cs

示例14: GetDiscriminatorAlias

		protected override string GetDiscriminatorAlias(ILoadable persister, string suffix)
		{
			return persister.DiscriminatorColumnName;
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:4,代码来源:ColumnEntityAliases.cs

示例15: GetSuffixedPropertyAliases

		public string[][] GetSuffixedPropertyAliases(ILoadable persister)
		{
			int size = persister.PropertyNames.Length;
			string[][] suffixedPropertyAliases = new string[size][];
			for (int j = 0; j < size; j++)
			{
				suffixedPropertyAliases[j] = GetUserProvidedAliases(persister.PropertyNames[j], GetPropertyAliases(persister, j));
				Intern(suffixedPropertyAliases[j]);
			}
			return suffixedPropertyAliases;
		}
开发者ID:jlevitt,项目名称:nhibernate-core,代码行数:11,代码来源:DefaultEntityAliases.cs


注:本文中的ILoadable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。