本文整理汇总了C#中ICollection.HasRecords方法的典型用法代码示例。如果您正苦于以下问题:C# ICollection.HasRecords方法的具体用法?C# ICollection.HasRecords怎么用?C# ICollection.HasRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICollection
的用法示例。
在下文中一共展示了ICollection.HasRecords方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CallSource
public void CallSource(ICollection<IPointToLaceProvider> response)
{
var spec = new CanHandlePackageSpecification(DataProviderName.LSAutoVIN12_I_DB, _request);
if (!spec.IsSatisfied || response.Exists<IProvideDataFromVin12>()) //don't execute again if we already have a vin 12 response cause vin12 can be a fallback for multiple DP
{
NotHandledResponse(response);
}
else
{
_dataProvider = _request.First().Package.DataProviders.Single(w => w.Name == DataProviderName.LSAutoVIN12_I_DB);
_logCommand = LogCommandTypes.ForDataProvider(_command, DataProviderCommandSource.LSAutoVIN12_I_DB, _dataProvider,
_dataProvider.BillablleState.NoRecordState);
_logCommand.LogBegin(new {_dataProvider});
var consumer = new ConsumeSource(new HandleVin12SourceCall(),
new CallVin12DataProvider(_dataProvider, new DataProviderRepository(), _logCommand));
consumer.ConsumeDataProvider(response);
_logCommand.LogEnd(new {response});
if (!response.HasRecords<IProvideDataFromVin12>()) CallFallbackSource(response, _command);
}
CallNextSource(response, _command);
}
示例2: CallSource
public void CallSource(ICollection<IPointToLaceProvider> response)
{
var spec = new CanHandlePackageSpecification(DataProviderName.LSPropertySearch_E_WS, _request);
if (!spec.IsSatisfied)
{
NotHandledResponse(response);
}
else
{
_dataProvider = _request.First().Package.DataProviders.Single(w => w.Name == DataProviderName.LSPropertySearch_E_WS);
_logCommand = LogCommandTypes.ForDataProvider(_command, DataProviderCommandSource.LSPropertySearch_E_WS, _dataProvider,
_dataProvider.BillablleState.NoRecordState);
_logCommand.LogBegin(new {_dataProvider});
var consumer = new ConsumeSource(new HandleLightstonePropertyCall(),
new CallLightstonePropertyDataProvider(_dataProvider, _logCommand));
consumer.ConsumeDataProvider(response);
_logCommand.LogEnd(new {response});
if (!response.HasRecords<IProvideDataFromLightstoneProperty>()) CallFallbackSource(response, _command);
}
CallNextSource(response, _command);
}
示例3: CallSource
public void CallSource(ICollection<IPointToLaceProvider> response)
{
var spec = new CanHandlePackageSpecification(DataProviderName.LSAutoVINMaster_I_DB, _request);
if (!spec.IsSatisfied)
{
NotHandledResponse(response);
}
else
{
_dataProvider = _request.First().Package.DataProviders.Single(w => w.Name == DataProviderName.LSAutoVINMaster_I_DB);
_logCommand = LogCommandTypes.ForDataProvider(_command, DataProviderCommandSource.LSAutoVINMaster_I_DB, _dataProvider,
_dataProvider.BillablleState.NoRecordState);
_logCommand.LogBegin(new {_dataProvider});
var consumer = new ConsumeSource(new HandleRgtVinDataProviderCall(),
new CallRgtVinDataProvider(_dataProvider, new DataProviderRepository(), _logCommand));
consumer.ConsumeDataProvider(response);
_logCommand.LogEnd(new {response});
if (!response.HasRecords<IProvideDataFromRgtVin>()) CallFallbackSource(response, _command);
}
CallNextSource(response, _command);
}