本文整理汇总了C#中MSBuildLogsExtended类的典型用法代码示例。如果您正苦于以下问题:C# MSBuildLogsExtended类的具体用法?C# MSBuildLogsExtended怎么用?C# MSBuildLogsExtended使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MSBuildLogsExtended类属于命名空间,在下文中一共展示了MSBuildLogsExtended类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssignEnityReferenceIDs
/// <summary>
/// Assigns the enity reference Ids.
/// </summary>
/// <param name="input">The input.</param>
public static void AssignEnityReferenceIDs(MSBuildLogsExtended.DataSourceEntities.SolutionCollection input)
{
for(int i = 0; i < input.Count; i ++)
{
MSBuildLogsExtended.DataSourceEntities.Solution _Item = input[i];
}
}
示例2: InsertEntity
/// <summary>
/// Inserts an entity of <see cref=" MSBuildLogsExtended.DataSourceEntities.Build"/>.
/// </summary>
/// <param name="input">input entity</param>
/// <returns>a message with action result</returns>
public static MSBuildLogsExtended.CommonBLLEntities.BusinessLogicLayerResponseMessageBuiltInBuild InsertEntity(
MSBuildLogsExtended.DataSourceEntities.Build input)
{
MSBuildLogsExtended.CommonBLLEntities.BusinessLogicLayerRequestMessageBuiltInBuild _Request =new MSBuildLogsExtended.CommonBLLEntities.BusinessLogicLayerRequestMessageBuiltInBuild(Framework.CommonBLLEntities.BusinessLogicLayerRequestTypes.Create, Framework.CommonBLLEntities.BusinessLogicLayerRequestTypes.Create.ToString(), Guid.NewGuid().ToString());
_Request.Critieria = new MSBuildLogsExtended.DataSourceEntities.BuildCollection();
_Request.Critieria.Add(input);
return InsertRequest(_Request);
}
示例3: ValidateValueBeforeSaveToDatabase
/// <summary>
/// Validates the value before save to database.
/// </summary>
/// <param name="input">The input.</param>
public static void ValidateValueBeforeSaveToDatabase(MSBuildLogsExtended.DataSourceEntities.SolutionCollection input)
{
for(int i = 0; i < input.Count; i ++)
{
MSBuildLogsExtended.DataSourceEntities.Solution _Item = input[i];
ValidateValueBeforeSaveToDatabase(_Item);
}
}
示例4: AssignEnityReferenceIDs
/// <summary>
/// Assigns the enity reference Ids.
/// </summary>
/// <param name="input">The input.</param>
public static void AssignEnityReferenceIDs(MSBuildLogsExtended.DataSourceEntities.BuildCollection input, System.Int32 solutionId)
{
for(int i = 0; i < input.Count; i ++)
{
MSBuildLogsExtended.DataSourceEntities.Build _Item = input[i];
_Item.SolutionId = solutionId;
}
}
示例5: AssignEnityReferenceIDs
/// <summary>
/// Assigns the enity reference Ids.
/// </summary>
/// <param name="input">The input.</param>
public static void AssignEnityReferenceIDs(MSBuildLogsExtended.DataSourceEntities.BuildLogCollection input, System.Int64 buildId, System.Int32 buildEventCodeId)
{
for(int i = 0; i < input.Count; i ++)
{
MSBuildLogsExtended.DataSourceEntities.BuildLog _Item = input[i];
_Item.BuildId = buildId;
_Item.BuildEventCodeId = buildEventCodeId;
}
}
示例6: ValidateValueBeforeSaveToDatabase
/// <summary>
/// Validates the value before save to database.
/// </summary>
/// <param name="item">The item.</param>
public static void ValidateValueBeforeSaveToDatabase(MSBuildLogsExtended.DataSourceEntities.BuildLog item)
{
// DateTimePropertiesToMinValueOfDateTimeInSQL
if (item.EventTime < Framework.DateTimePeriodHelper.MinValueOfDateTimeInSQL)
{
item.EventTime = Framework.DateTimePeriodHelper.MinValueOfDateTimeInSQL;
}
}
示例7: DeleteEntity
public void DeleteEntity(
MSBuildLogsExtended.DataSourceEntities.Build input)
{
MSBuildLogsExtended.CommonBLLEntities.BusinessLogicLayerResponseMessageBuiltInBuild responseMessage = MSBuildLogsExtended.CommonBLLIoC.BusinessLogicLayerEntityStaticBuild.DeleteEntity(input);
if (responseMessage.BusinessLogicLayerResponseStatus != Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageOK)
{
throw new HttpResponseException(HttpStatusCode.NotFound);
}
}
示例8: DeleteByIdentifierEntity
public void DeleteByIdentifierEntity(
MSBuildLogsExtended.DataSourceEntities.SolutionIdentifier identifier)
{
MSBuildLogsExtended.CommonBLLEntities.BusinessLogicLayerResponseMessageBuiltInSolution responseMessage = MSBuildLogsExtended.CommonBLLIoC.BusinessLogicLayerEntityStaticSolution.DeleteByIdentifierEntity(identifier);
if (responseMessage.BusinessLogicLayerResponseStatus != Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageOK)
{
throw new HttpResponseException(HttpStatusCode.NotFound);
}
}
示例9: Insert
/// <summary>
/// single item insert with entity input
/// </summary>
/// <param name="input">to-be-inserted instance of entity class</param>
public MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionSolution Insert(MSBuildLogsExtended.DataSourceEntities.Solution input)
{
log.Info(string.Format("{0}: Insert", Framework.LoggingOptions.Data_Access_Layer_Process_Started.ToString()));
MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionSolution _retval = new MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionSolution();
_retval.OriginalValue = new MSBuildLogsExtended.DataSourceEntities.SolutionCollection();
_retval.OriginalValue.Add(input);
if (input != null)
{
MSBuildLogsExtended.LinqToSqlContexts.Solution _LinqItem = MSBuildLogsExtended.EntityContracts.ISolutionHelper.Clone<MSBuildLogsExtended.DataSourceEntities.Solution, MSBuildLogsExtended.LinqToSqlContexts.Solution>(input);
this.LinqContext.Solution.InsertOnSubmit(_LinqItem);
this.LinqContext.SubmitChanges();
MSBuildLogsExtended.DataSourceEntities.Solution _Result = new MSBuildLogsExtended.DataSourceEntities.Solution();
MSBuildLogsExtended.EntityContracts.ISolutionHelper.Copy<MSBuildLogsExtended.LinqToSqlContexts.Solution, MSBuildLogsExtended.DataSourceEntities.Solution>(_LinqItem, _Result);
_retval.Result = new MSBuildLogsExtended.DataSourceEntities.SolutionCollection();
_retval.Result.Add(_Result);
}
log.Info(string.Format("{0}: Insert", Framework.LoggingOptions.Data_Access_Layer_Process_Ended.ToString()));
return _retval;
}
示例10: Insert
/// <summary>
/// single item insert with entity input
/// </summary>
/// <param name="input">to-be-inserted instance of entity class</param>
public MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog Insert(MSBuildLogsExtended.DataSourceEntities.BuildLog input)
{
log.Info(string.Format("{0}: Insert", Framework.LoggingOptions.Data_Access_Layer_Process_Started.ToString()));
MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog _retval = new MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog();
_retval.OriginalValue = new MSBuildLogsExtended.DataSourceEntities.BuildLogCollection();
_retval.OriginalValue.Add(input);
if (input != null)
{
MSBuildLogsExtended.EntityFrameworkContext.BuildLog _LinqItem = MSBuildLogsExtended.EntityContracts.IBuildLogHelper.Clone<MSBuildLogsExtended.DataSourceEntities.BuildLog, MSBuildLogsExtended.EntityFrameworkContext.BuildLog>(input);
this.LinqContext.BuildLog.Add(_LinqItem);
this.LinqContext.SaveChanges();
MSBuildLogsExtended.DataSourceEntities.BuildLog _Result = new MSBuildLogsExtended.DataSourceEntities.BuildLog();
MSBuildLogsExtended.EntityContracts.IBuildLogHelper.Copy<MSBuildLogsExtended.EntityFrameworkContext.BuildLog, MSBuildLogsExtended.DataSourceEntities.BuildLog>(_LinqItem, _Result);
_retval.Result = new MSBuildLogsExtended.DataSourceEntities.BuildLogCollection();
_retval.Result.Add(_Result);
}
log.Info(string.Format("{0}: Insert", Framework.LoggingOptions.Data_Access_Layer_Process_Ended.ToString()));
return _retval;
}
示例11: GetLinqObjectByIdentifier
/// <summary>
/// Gets the linq object by identifier.
/// </summary>
/// <param name="id">The id.</param>
/// <returns>an instance of <see cref="MSBuildLogsExtended.EntityFrameworkContext.BuildLog"/> class, with same identifier, which is a IQueryable.</returns>
private MSBuildLogsExtended.EntityFrameworkContext.BuildLog GetLinqObjectByIdentifier(MSBuildLogsExtended.EntityContracts.IBuildLogIdentifier id)
{
Func<MSBuildLogsExtended.EntityFrameworkContext.BuildLog, bool> m_Predicate = (MSBuildLogsExtended.EntityFrameworkContext.BuildLog t) =>
{
return MSBuildLogsExtended.EntityContracts.IBuildLogIdentifierHelper.Equals<MSBuildLogsExtended.EntityContracts.IBuildLogIdentifier, MSBuildLogsExtended.EntityFrameworkContext.BuildLog>(id, t);
};
return this.LinqContext.BuildLog.SingleOrDefault<MSBuildLogsExtended.EntityFrameworkContext.BuildLog>(m_Predicate);
}
示例12: BatchUpdate
/// <summary>
/// Batches the update with entity collection input.
/// </summary>
/// <param name="input">The input.</param>
public MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog BatchUpdate(MSBuildLogsExtended.DataSourceEntities.BuildLogCollection input)
{
log.Info(string.Format("{0}: BatchUpdate", Framework.LoggingOptions.Data_Access_Layer_Process_Started.ToString()));
MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog _retval = new MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog();
_retval.OriginalValue = input;
if (input != null)
{
List<MSBuildLogsExtended.EntityFrameworkContext.BuildLog> _ListOfLinq = new List<MSBuildLogsExtended.EntityFrameworkContext.BuildLog>();
foreach (MSBuildLogsExtended.DataSourceEntities.BuildLog _ItemOfInput in input)
{
MSBuildLogsExtended.EntityFrameworkContext.BuildLog _LinqItem = GetLinqObjectByIdentifier(_ItemOfInput);
MSBuildLogsExtended.EntityContracts.IBuildLogHelper.Copy<MSBuildLogsExtended.DataSourceEntities.BuildLog, MSBuildLogsExtended.EntityFrameworkContext.BuildLog>(_ItemOfInput, _LinqItem);
_ListOfLinq.Add(_LinqItem);
}
this.LinqContext.SaveChanges();
for (int i = 0; i < input.Count; i++)
{
MSBuildLogsExtended.EntityContracts.IBuildLogHelper.Copy
<
MSBuildLogsExtended.EntityFrameworkContext.BuildLog, MSBuildLogsExtended.DataSourceEntities.BuildLog
>(_ListOfLinq[i], input[i]);
}
}
log.Info(string.Format("{0}: BatchUpdate", Framework.LoggingOptions.Data_Access_Layer_Process_Ended.ToString()));
return _retval;
}
示例13: GetByIdentifier
/// <summary>
/// Gets an entity instance by input identifier.
/// </summary>
/// <param name="id">The id.</param>
/// <returns>an instance of <see cref="MSBuildLogsExtended.DataSourceEntities.BuildLogIdentifier"/> class, with same identifier.</returns>
public MSBuildLogsExtended.DataSourceEntities.BuildLog GetByIdentifier(MSBuildLogsExtended.DataSourceEntities.BuildLogIdentifier id)
{
MSBuildLogsExtended.EntityFrameworkContext.BuildLog _Only = GetLinqObjectByIdentifier(id);
if (_Only != null)
{
return new MSBuildLogsExtended.DataSourceEntities.BuildLog(_Only);
}
else
{
return null;
}
}
示例14: BatchInsert
/// <summary>
/// Batches insert with entity collection input.
/// </summary>
/// <param name="input">The input.</param>
public MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog BatchInsert(MSBuildLogsExtended.DataSourceEntities.BuildLogCollection input)
{
log.Info(string.Format("{0}: BatchInsert", Framework.LoggingOptions.Data_Access_Layer_Process_Started.ToString()));
MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog _retval = new MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog();
_retval.OriginalValue = input;
if (input != null && input.Count > 0)
{
try
{
DataTable _DataTable = new DataTable();
_DataTable.Columns.Add("Id", typeof(System.Int64));
_DataTable.Columns.Add("BuildId", typeof(System.Int64));
_DataTable.Columns.Add("BuildEventCodeId", typeof(System.Int32));
_DataTable.Columns.Add("Message", typeof(System.String));
_DataTable.Columns.Add("EventTime", typeof(System.DateTime));
foreach (MSBuildLogsExtended.DataSourceEntities.BuildLog _Item in input)
{
_DataTable.Rows.Add(new object[] { _Item.Id, _Item.BuildId, _Item.BuildEventCodeId, _Item.Message, _Item.EventTime });
}
using (SqlBulkCopy s = new SqlBulkCopy(this.LinqContext.Database.Connection.ConnectionString))
{
s.DestinationTableName = "dbo.BuildLog";
s.ColumnMappings.Add("Id", "Id");
s.ColumnMappings.Add("BuildId", "BuildId");
s.ColumnMappings.Add("BuildEventCodeId", "BuildEventCodeId");
s.ColumnMappings.Add("Message", "Message");
s.ColumnMappings.Add("EventTime", "EventTime");
s.NotifyAfter = 10000;
s.WriteToServer(_DataTable);
s.Close();
}
}
catch (Exception ex)
{
log.Error(string.Format("{0}: Insert", Framework.LoggingOptions.Data_Access_Layer_Process_Ended.ToString()), ex);
}
}
log.Info(string.Format("{0}: BatchInsert", Framework.LoggingOptions.Data_Access_Layer_Process_Ended.ToString()));
return _retval;
}
示例15: BatchDelete
/// <summary>
/// Batches the delete with entity collection input.
/// </summary>
/// <param name="input">The input.</param>
public MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog BatchDelete(MSBuildLogsExtended.DataSourceEntities.BuildLogCollection input)
{
log.Info(string.Format("{0}: BatchDelete", Framework.LoggingOptions.Data_Access_Layer_Process_Started.ToString()));
MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog _retval = new MSBuildLogsExtended.DataSourceEntities.DataAccessLayerMessageOfEntityCollectionBuildLog();
_retval.OriginalValue = input;
if (input != null)
{
List<MSBuildLogsExtended.EntityFrameworkContext.BuildLog> _ListOfLinq = new List<MSBuildLogsExtended.EntityFrameworkContext.BuildLog>();
foreach (MSBuildLogsExtended.DataSourceEntities.BuildLog _ItemOfInput in input)
{
MSBuildLogsExtended.EntityFrameworkContext.BuildLog _LinqItem = GetLinqObjectByIdentifier(_ItemOfInput);
this.LinqContext.BuildLog.Remove(_LinqItem);
}
this.LinqContext.SaveChanges();
}
log.Info(string.Format("{0}: BatchDelete", Framework.LoggingOptions.Data_Access_Layer_Process_Ended.ToString()));
return _retval;
}