本文整理汇总了C#中IResultTransformer类的典型用法代码示例。如果您正苦于以下问题:C# IResultTransformer类的具体用法?C# IResultTransformer怎么用?C# IResultTransformer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IResultTransformer类属于命名空间,在下文中一共展示了IResultTransformer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Init
public void Init(ISession session, ISearchFactoryImplementor searchFactoryImplementor,
IResultTransformer transformer, string[] aliases)
{
Init(session, searchFactoryImplementor);
this.transformer = transformer;
this.aliases = aliases;
}
开发者ID:kstenson,项目名称:NHibernate.Search,代码行数:7,代码来源:ProjectionLoader.cs
示例2: Session
public Session(IResultTransformer resultTransformer, IDao<Bank> bankDao, IDao<LogModel> logDao, IDao<Customer> customerDao)
: base(resultTransformer)
{
this.bankDao = bankDao;
this.logDao = logDao;
this.customerDao = customerDao;
}
开发者ID:BosphorusTeam,项目名称:bosphorus.dao,代码行数:7,代码来源:Session.cs
示例3: GetResultColumnOrRow
protected override object GetResultColumnOrRow(object[] row, IResultTransformer resultTransformer, IDataReader rs,
ISessionImplementor session)
{
object[] result;
string[] aliases;
if (translator.HasProjection)
{
IType[] types = translator.ProjectedTypes;
result = new object[types.Length];
string[] columnAliases = translator.ProjectedColumnAliases;
for (int i = 0; i < result.Length; i++)
{
result[i] = types[i].NullSafeGet(rs, columnAliases[i], session, null);
}
aliases = translator.ProjectedAliases;
}
else
{
result = row;
aliases = userAliases;
}
return translator.RootCriteria.ResultTransformer.TransformTuple(result, aliases);
}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:25,代码来源:CriteriaLoader.cs
示例4: SetResultTransformerIfNotNull
public static void SetResultTransformerIfNotNull(this ICriteria criteria, IResultTransformer transformer)
{
if (transformer != null)
criteria.SetResultTransformer(transformer);
else
criteria.SetResultTransformer(new RootEntityResultTransformer());
}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:7,代码来源:CriteriaUtil.cs
示例5: GetHolderInstantiator
public static HolderInstantiator GetHolderInstantiator(IResultTransformer selectNewTransformer,
IResultTransformer customTransformer,
string[] queryReturnAliases)
{
return new HolderInstantiator(ResolveResultTransformer(selectNewTransformer, customTransformer),
queryReturnAliases);
}
开发者ID:NikGovorov,项目名称:nhibernate-core,代码行数:7,代码来源:HolderInstantiator.cs
示例6: LinqProvider
//this.Add("LinqProvider - LinQ Equals ", () => from model in accountDao.Query() where model.No == 0L select model);
//this.Add("LinqProvider - LinQ Oracle Left Join", () =>
// from model in accountDao.Query()
// from customer in bankDao.Query()
// where model.Customer.Id == customer.Id.OraclePlus()
// select model);
public LinqProvider(IResultTransformer resultTransformer, IDao<Customer> customerDao, IDao<Account> accountDao)
: base(resultTransformer)
{
this.customerDao = customerDao;
this.accountDao = accountDao;
inList = new[] {"Onur", "Oğuz"};
}
开发者ID:BosphorusTeam,项目名称:bosphorus.dao,代码行数:14,代码来源:LinqProvider.cs
示例7: Session
public Session(IResultTransformer resultTransformer, IDao<Bank> bankDao, IDao<LogModel> logDao, ISessionProviderFactory<NHibernateStatelessSession> sessionProviderFactory)
: base(resultTransformer)
{
this.bankDao = bankDao;
this.logDao = logDao;
logSessionProvider = sessionProviderFactory.Build("LOG");
}
开发者ID:BosphorusTeam,项目名称:bosphorus.dao,代码行数:7,代码来源:Session.cs
示例8: AutoMap
public AutoMap(IResultTransformer resultTransformer, IDao<Bank> bankDao, IDao<Account> accountDao, IDao<Customer> customerDao, IMapper mapper)
: base(resultTransformer)
{
this.bankDao = bankDao;
this.accountDao = accountDao;
this.customerDao = customerDao;
this.mapper = mapper;
}
开发者ID:BosphorusTeam,项目名称:bosphorus.dao,代码行数:8,代码来源:AutoMap.cs
示例9: GetCustomerOrderHistory
private static IList<CustomerOrderHistory> GetCustomerOrderHistory(string customerId, IResultTransformer transformer) {
var query =
UnitOfWork.CurrentSession.GetNamedQuery("NSoft.NFramework.Data.NHibernateEx.Domain.Northwind.GetCustomerOrderHistory",
new NHParameter("CustomerId", customerId, TypeFactory.GetStringType(255)));
query.SetResultTransformer(transformer);
return query.List<CustomerOrderHistory>();
}
开发者ID:debop,项目名称:NFramework,代码行数:8,代码来源:CustomerOrderHistoryFixture.cs
示例10: HolderInstantiator
public HolderInstantiator(
IResultTransformer transformer,
string[] queryReturnAliases
)
{
this.transformer = transformer;
this.queryReturnAliases = queryReturnAliases;
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:8,代码来源:HolderInstantiator.cs
示例11: QueryParameters
public QueryParameters(IType[] positionalParameterTypes, object[] positionalParameterValues,
IDictionary<string, LockMode> lockModes, RowSelection rowSelection, bool cacheable,
string cacheRegion, string comment, bool isLookupByNaturalKey, IResultTransformer transformer)
: this(
positionalParameterTypes, positionalParameterValues, null, lockModes, rowSelection, false, cacheable, cacheRegion,
comment, null, transformer)
{
NaturalKeyLookup = isLookupByNaturalKey;
}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:9,代码来源:QueryParameters.cs
示例12: QueryParameters
public QueryParameters(IDictionary<string, TypedValue> namedParameters, IDictionary<string, LockMode> lockModes, RowSelection rowSelection, bool isReadOnlyInitialized,
bool readOnly, bool cacheable, string cacheRegion, string comment, bool isLookupByNaturalKey, IResultTransformer transformer)
: this(
ArrayHelper.EmptyTypeArray, ArrayHelper.EmptyObjectArray, namedParameters, lockModes, rowSelection, isReadOnlyInitialized, readOnly, cacheable, cacheRegion, comment, null,
transformer)
{
// used by CriteriaTranslator
NaturalKeyLookup = isLookupByNaturalKey;
}
开发者ID:Ruhollah,项目名称:nhibernate-core,代码行数:9,代码来源:QueryParameters.cs
示例13: GetHolderInstantiator
public static HolderInstantiator GetHolderInstantiator(IResultTransformer selectNewTransformer,
IResultTransformer customTransformer,
string[] queryReturnAliases)
{
//todo ÐÞ¸ÄÔ´Âë
if (customTransformer != null)
return new HolderInstantiator(customTransformer, queryReturnAliases);
else
return new HolderInstantiator(selectNewTransformer, queryReturnAliases);
}
开发者ID:Mrding,项目名称:Ribbon,代码行数:10,代码来源:HolderInstantiator.cs
示例14: CreateClassicHolderInstantiator
public static HolderInstantiator CreateClassicHolderInstantiator(ConstructorInfo constructor,
IResultTransformer transformer)
{
if (constructor != null)
{
return new HolderInstantiator(new AliasToBeanConstructorResultTransformer(constructor), null);
}
else
{
return new HolderInstantiator(transformer, null);
}
}
开发者ID:Mrding,项目名称:Ribbon,代码行数:12,代码来源:HolderInstantiator.cs
示例15: GetHolderInstantiator
public static HolderInstantiator GetHolderInstantiator(IResultTransformer selectNewTransformer,
IResultTransformer customTransformer,
string[] queryReturnAliases)
{
if (selectNewTransformer != null)
{
return new HolderInstantiator(selectNewTransformer, queryReturnAliases);
}
else
{
return new HolderInstantiator(customTransformer, queryReturnAliases);
}
}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:13,代码来源:HolderInstantiator.cs
示例16: QueryParameters
public QueryParameters(IType[] positionalParameterTypes, object[] positionalParameterValues, IDictionary<string, TypedValue> namedParameters, IDictionary<string, LockMode> lockModes, RowSelection rowSelection, bool isReadOnlyInitialized, bool readOnly, bool cacheable, string cacheRegion, string comment, object[] collectionKeys, IResultTransformer transformer)
{
_positionalParameterTypes = positionalParameterTypes;
_positionalParameterValues = positionalParameterValues;
_namedParameters = namedParameters;
_lockModes = lockModes;
_rowSelection = rowSelection;
_cacheable = cacheable;
_cacheRegion = cacheRegion;
_comment = comment;
_collectionKeys = collectionKeys;
_isReadOnlyInitialized = isReadOnlyInitialized;
_readOnly = readOnly;
_resultTransformer = transformer;
}
开发者ID:pontillo,项目名称:PowerNap,代码行数:15,代码来源:QueryParameters.cs
示例17: GetResultColumnOrRow
protected override object GetResultColumnOrRow(object[] row, IResultTransformer customResultTransformer, IDataReader rs,
ISessionImplementor session)
{
object[] result;
if (translator.HasProjection)
{
IType[] types = translator.ProjectedTypes;
result = new object[types.Length];
string[] columnAliases = translator.ProjectedColumnAliases;
for (int i = 0, position = 0; i < result.Length; i++)
{
int numColumns = types[i].GetColumnSpan(session.Factory);
if ( numColumns > 1 )
{
string[] typeColumnAliases = ArrayHelper.Slice(columnAliases, position, numColumns);
result[i] = types[i].NullSafeGet(rs, typeColumnAliases, session, null);
}
else
{
result[i] = types[i].NullSafeGet(rs, columnAliases[position], session, null);
}
position += numColumns;
}
}
else
{
result = row;
}
if (customResultTransformer == null)
{
// apply the defaut transformer of criteria aka RootEntityResultTransformer
return result[result.Length - 1];
}
return result;
}
开发者ID:jaundice,项目名称:nhibernate-core,代码行数:39,代码来源:CriteriaLoader.cs
示例18: GetResultColumnOrRow
protected override object GetResultColumnOrRow(object[] row, IResultTransformer resultTransformer, IDataReader rs,
ISessionImplementor session)
{
object[] result;
string[] aliases;
if (translator.HasProjection)
{
IType[] types = translator.ProjectedTypes;
result = new object[types.Length];
string[] columnAliases = translator.ProjectedColumnAliases;
for (int i = 0, position = 0; i < result.Length; i++)
{
int numColumns = types[i].GetColumnSpan(session.Factory);
if ( numColumns > 1 )
{
string[] typeColumnAliases = ArrayHelper.Slice(columnAliases, position, numColumns);
result[i] = types[i].NullSafeGet(rs, typeColumnAliases, session, null);
}
else
{
result[i] = types[i].NullSafeGet(rs, columnAliases[position], session, null);
}
position += numColumns;
}
aliases = translator.ProjectedAliases;
}
else
{
result = row;
aliases = userAliases;
}
return translator.RootCriteria.ResultTransformer.TransformTuple(result, aliases);
}
开发者ID:tkellogg,项目名称:NHibernate3-withProxyHooks,代码行数:36,代码来源:CriteriaLoader.cs
示例19: Cascade_InSession
public Cascade_InSession(IResultTransformer resultTransformer, INHibernateStatefulDao<Account> accountDao, INHibernateStatefulDao<Customer> customerDao)
: base(resultTransformer, accountDao, customerDao)
{
this.accountDao = accountDao;
this.customerDao = customerDao;
}
开发者ID:BosphorusTeam,项目名称:bosphorus.dao,代码行数:6,代码来源:Cascade.InSession.cs
示例20: GetResultColumnOrRow
/// <summary>
/// Get the actual object that is returned in the user-visible result list.
/// </summary>
/// <remarks>
/// This empty implementation merely returns its first argument. This is
/// overridden by some subclasses.
/// </remarks>
protected virtual object GetResultColumnOrRow(object[] row, IResultTransformer resultTransformer, IDataReader rs,
ISessionImplementor session)
{
return row;
}
开发者ID:remcoros,项目名称:nhibernate,代码行数:12,代码来源:Loader.cs
注:本文中的IResultTransformer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论