本文整理汇总了C#中NHibernate.Mapping.List类的典型用法代码示例。如果您正苦于以下问题:C# List类的具体用法?C# List怎么用?C# List使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
List类属于NHibernate.Mapping命名空间,在下文中一共展示了List类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CreateList
private Mapping.Collection CreateList(XmlNode node, string prefix, string path,
PersistentClass owner, System.Type containingType)
{
List list = new List(owner);
BindCollection(node, list, prefix, path, containingType);
return list;
}
开发者ID:pallmall,项目名称:WCell,代码行数:7,代码来源:CollectionBinder.cs
示例2: PrimaryKeyModel
public PrimaryKeyModel(List<Column> pkCols, bool identity, string name, bool clustered)
{
PkCols = pkCols;
Identity = identity;
Name = name;
Clustered = clustered;
}
开发者ID:jeffreyabecker,项目名称:NHMigrations,代码行数:7,代码来源:PrimaryKeyModel.cs
示例3: GetSlabInfoByTimeInterval
public ISlabInfo[] GetSlabInfoByTimeInterval(long aFrom, long aTo)
{
try {
using (var session = NHibernateHelper.OpenSession()) {
var entitys = session.CreateCriteria(typeof(SlabInfoEntity))
.Add(Restrictions.Between("StartScanTime", aFrom, aTo))
.List<SlabInfoEntity>();
var results = new List<ISlabInfo>();
foreach (var entity in entitys) {
results.Add(new SlabInfoImpl {
Id = entity.Id,
Number = entity.Number,
StandartSizeId = entity.StandartSizeId,
StartScanTime = entity.StartScanTime,
EndScanTime = entity.EndScanTime
});
}
return results.ToArray();
}
}
catch (Exception ex) {
logger.Error("Ошибка при чтении SlabInfo: " + ex.Message);
return null;
}
}
开发者ID:desla,项目名称:SlabGeometryControl,代码行数:27,代码来源:NHibernateSlabInfoWriter.cs
示例4: Mapper
public Mapper(Assembly[] assemblies)
{
_assemblies = assemblies;
_conventions = new List<Convention>(12);
_hiloInserts = new List<string>(20);
AppendConventions();
}
开发者ID:solyutor,项目名称:enhima,代码行数:7,代码来源:Mapper.cs
示例5: GetProperties
public override PropertyDescriptorCollection GetProperties()
{
if (_properties == null)
{
bool hasEntityAttributes = false;
_properties = base.GetProperties();
var list = new List<PropertyDescriptor>();
foreach (PropertyDescriptor descriptor in _properties)
{
List<Attribute> attrs = GetEntityMemberAttributes(descriptor).ToList();
if (_metaDataAttributes.ContainsKey(descriptor.Name))
attrs.AddRange(_metaDataAttributes[descriptor.Name]);
if (attrs.Any())
{
hasEntityAttributes = true;
list.Add(new PropertyDescriptorWrapper(descriptor, attrs.ToArray()));
}
else
{
list.Add(descriptor);
}
}
if (hasEntityAttributes)
_properties = new PropertyDescriptorCollection(list.ToArray(), true);
}
return _properties;
}
开发者ID:OpenRIAServices,项目名称:OpenRiaServices,代码行数:27,代码来源:NHibernateTypeDescriptor.cs
示例6: CreateList
private Mapping.Collection CreateList(XmlNode node, string prefix, string path,
PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
{
List list = new List(owner);
BindCollection(node, list, prefix, path, containingType, inheritedMetas);
return list;
}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:7,代码来源:CollectionBinder.cs
示例7: ProcessIndex
private void ProcessIndex(XmlElement indexElement, IDictionary<string, Table> tables)
{
var tableName = indexElement.GetAttribute("table");
var columnNames = CollectionUtils.Map(indexElement.GetAttribute("columns").Split(','), (string s) => s.Trim());
if (string.IsNullOrEmpty(tableName) || columnNames.Count <= 0)
return;
// get table by name
Table table;
if (!tables.TryGetValue(tableName, out table))
throw new DdlException(
string.Format("An additional index refers to a table ({0}) that does not exist.", table.Name),
null);
// get columns by name
var columns = new List<Column>();
foreach (var columnName in columnNames)
{
var column = CollectionUtils.SelectFirst(table.ColumnIterator, col => col.Name == columnName);
// bug #6994: could be that the index file specifies a column name that does not actually exist, so we need to check for nulls
if (column == null)
throw new DdlException(
string.Format("An additional index on table {0} refers to a column ({1}) that does not exist.", table.Name, columnName),
null);
columns.Add(column);
}
// create index
CreateIndex(table, columns);
}
开发者ID:nhannd,项目名称:Xian,代码行数:31,代码来源:AdditionalIndexProcessor.cs
示例8: SqlTriggerBody
public override string SqlTriggerBody(
Dialect dialect, IMapping p,
string defaultCatalog, string defaultSchema)
{
var auditTableName = dialect.QuoteForTableName(_auditTableName);
var eDialect = (IExtendedDialect)dialect;
string triggerSource = _action == TriggerActions.DELETE ?
eDialect.GetTriggerOldDataAlias() :
eDialect.GetTriggerNewDataAlias();
var columns = new List<string>(_dataColumnNames);
columns.AddRange(from ac in _auditColumns
select ac.Name);
var values = new List<string>();
values.AddRange(
from columnName in _dataColumnNames
select eDialect.QualifyColumn(
triggerSource, columnName));
values.AddRange(
from auditColumn in _auditColumns
select auditColumn.ValueFunction.Invoke(_action));
return eDialect.GetInsertIntoString(auditTableName,
columns, triggerSource, values);
}
开发者ID:akhuang,项目名称:NHibernate,代码行数:27,代码来源:AuditTrigger.cs
示例9: ObtenerPorNombre
public static IList<Proyecto> ObtenerPorNombre(String nombre)
{
IList<Proyecto> proyecto = new List<Proyecto>();
try
{
using (ISession session = Persistencia.SessionFactory.OpenSession())
{
ICriteria criteria = session.CreateCriteria<Proyecto>();
criteria.Add(
Expression.Like("Nombre", nombre, MatchMode.Anywhere) /*||
Expression.Like("Responsable", nombre, MatchMode.Anywhere) ||
Expression.Like("TipoPrograma", nombre, MatchMode.Anywhere) ||
Expression.Like("Sector", nombre, MatchMode.Anywhere) ||
Expression.Like("Giro", nombre, MatchMode.Anywhere) ||
Expression.Like("Empresa", nombre, MatchMode.Anywhere) ||
Expression.Like("Telefono", nombre, MatchMode.Anywhere) ||
Expression.Like("Periodo", nombre, MatchMode.Anywhere) ||
Expression.Like("Horario", nombre, MatchMode.Anywhere) ||
Expression.Like("Horas", nombre, MatchMode.Anywhere)*/);
proyecto = criteria.List<Proyecto>();
}
}
catch (Exception ex)
{
throw ex;
}
return proyecto;
}
开发者ID:jahazielhigareda,项目名称:ServicioSocial,代码行数:30,代码来源:ProyectoNegocio.cs
示例10: CreateList
private Mapping.Collection CreateList(HbmList listMapping, string prefix, string path,
PersistentClass owner, System.Type containingType, IDictionary<string, MetaAttribute> inheritedMetas)
{
var list = new List(owner);
BindCollection(listMapping, list, prefix, path, containingType, inheritedMetas);
AddListSecondPass(listMapping, list, inheritedMetas);
return list;
}
开发者ID:NikGovorov,项目名称:nhibernate-core,代码行数:8,代码来源:CollectionBinder.cs
示例11: viewroots
public void viewroots() {
var result = new List<string>();
result.Add(MonoRailConfiguration.GetConfig().ViewEngineConfig.ViewPathRoot);
foreach (var path in MonoRailConfiguration.GetConfig().ViewEngineConfig.PathSources) {
result.Add(path);
}
PropertyBag["result"] = result;
}
开发者ID:Qorpent,项目名称:comdiv.oldcore,代码行数:9,代码来源:SysInfoController.cs
示例12: GetObjects
public System.Collections.IList GetObjects(string hql)
{
using (var factory = CreateSessionFactory(connectionString))
using (var session = factory.OpenSession())
{
List<object> results = new List<object>();
var query = session.CreateQuery(hql);
query.List(results);
return results;
}
}
开发者ID:kamchung322,项目名称:eXpand,代码行数:11,代码来源:PersistenceManager.cs
示例13: FeelProducts
public static List<Products> FeelProducts()
{
List<Products> result = new List<Products>
{
new Products{ Id = 1, Name = "LG", Declarations = "bla bla bla"},
new Products{ Id = 2, Name = "Sumsung", Declarations = "bla bla bla"},
new Products{ Id = 3, Name = "Apple", Declarations = "bla bla bla"},
new Products{ Id = 4, Name = "Sony", Declarations = "bla bla bla"}
};
return result;
}
开发者ID:Baidullayev,项目名称:onlineShop,代码行数:11,代码来源:Feeler.cs
示例14: GetContentList
public List<DiskContentModel> GetContentList(Directories dir)
{
var listOfDirectories = dir.SubFolder.ToList();
var listOfContent = new List<DiskContentModel>();
foreach (var dirs in listOfDirectories)
{
listOfContent.Add(Mapper.Map<Directories, DiskContentModel>(dirs));
}
return listOfContent;
}
开发者ID:Edalzebu,项目名称:MiniDropbox,代码行数:11,代码来源:DiskController.cs
示例15: InitMap
/// <summary>
/// Populate the metadata header.
/// </summary>
void InitMap()
{
_map = new Dictionary<string, object>();
_typeList = new List<Dictionary<string, object>>();
_typeNames = new HashSet<string>();
_resourceMap = new Dictionary<string, object>();
_fkMap = new Dictionary<string, string>();
_map.Add("localQueryComparisonOptions", "caseInsensitiveSQL");
_map.Add("structuralTypes", _typeList);
_map.Add("resourceEntityTypeMap",_resourceMap);
_map.Add(FK_MAP, _fkMap);
}
开发者ID:Rickinio,项目名称:breeze.server.net,代码行数:15,代码来源:NHBreezeMetadata.cs
示例16: CreateForeignKeyOfEntity
public override void CreateForeignKeyOfEntity(string entityName)
{
if (!HasFormula && !string.Equals("none", ForeignKeyName, StringComparison.InvariantCultureIgnoreCase))
{
var referencedColumns = new List<Column>(_prototype.ColumnSpan);
foreach (Column column in _prototype.ColumnIterator)
{
referencedColumns.Add(column);
}
ForeignKey fk = Table.CreateForeignKey(ForeignKeyName, ConstraintColumns, entityName, referencedColumns);
fk.CascadeDeleteEnabled = IsCascadeDeleteEnabled;
}
}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:14,代码来源:ReferenceDependantValue.cs
示例17: Class
public Class(Mapper mapper)
: base(mapper)
{
_versionTypes = new List<Type>(3)
{
typeof (short),
typeof (int),
typeof (long)
};
Mapper.IsEntity(IsEntity);
Mapper.IsRootEntity(IsRootEntity);
Mapper.IsVersion(IsVersion);
}
开发者ID:solyutor,项目名称:enhima,代码行数:14,代码来源:Class.cs
示例18: GenerateSchemaDropScriptAuxiliaryDatabaseObjects
public string[] GenerateSchemaDropScriptAuxiliaryDatabaseObjects(Func<IAuxiliaryDatabaseObject, bool> predicate)
{
Dialect dialect = Dialect.GetDialect(Properties);
string defaultCatalog = PropertiesHelper.GetString("default_catalog", Properties, null);
string defaultSchema = PropertiesHelper.GetString("default_schema", Properties, null);
List<string> list = new List<string>();
foreach (IAuxiliaryDatabaseObject obj2 in auxiliaryDatabaseObjects.Where(predicate))
{
if (obj2.AppliesToDialect(dialect))
{
list.Add(obj2.SqlDropString(dialect,defaultCatalog, defaultSchema));
}
}
return list.ToArray();
}
开发者ID:ericklombardo,项目名称:Nuaguil.Net,代码行数:16,代码来源:NhExtConfiguration.cs
示例19: AnalysisChromatograms
public AnalysisChromatograms(PeptideFileAnalysis peptideFileAnalysis)
{
PeptideFileAnalysis = peptideFileAnalysis;
FirstTime = peptideFileAnalysis.FirstTime;
LastTime = peptideFileAnalysis.LastTime;
Chromatograms = new List<ChromatogramGenerator.Chromatogram>();
for (int charge = PeptideAnalysis.MinCharge; charge <= PeptideAnalysis.MaxCharge; charge ++)
{
var mzs = PeptideAnalysis.TurnoverCalculator.GetMzs(charge);
for (int massIndex = 0; massIndex < mzs.Count; massIndex ++)
{
Chromatograms.Add(new ChromatogramGenerator.Chromatogram(new MzKey(charge, massIndex), mzs[massIndex]));
}
}
ScanIndexes = new List<int>();
Times = new List<double>();
}
开发者ID:lgatto,项目名称:proteowizard,代码行数:17,代码来源:ChromatogramGenerator.cs
示例20: AddPoints
public void AddPoints(int scanIndex, double time, List<MsDataFileUtil.ChromatogramPoint> points)
{
if (ScanIndexes.Count > 0)
{
Debug.Assert(scanIndex > ScanIndexes[ScanIndexes.Count - 1]);
Debug.Assert(time >= Times[Times.Count - 1]);
}
ScanIndexes.Add(scanIndex);
Times.Add(time);
for (int i = 0; i < Chromatograms.Count; i ++)
{
var chromatogram = Chromatograms[i];
var point = points[i];
chromatogram.Intensities.Add((float) point.Intensity);
chromatogram.PeakMzs.Add((float) point.PeakMz);
}
}
开发者ID:lgatto,项目名称:proteowizard,代码行数:17,代码来源:ChromatogramGenerator.cs
注:本文中的NHibernate.Mapping.List类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论