本文整理汇总了C#中IRecord类的典型用法代码示例。如果您正苦于以下问题:C# IRecord类的具体用法?C# IRecord怎么用?C# IRecord使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IRecord类属于命名空间,在下文中一共展示了IRecord类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartRecord
public new void StartRecord(IRecord r)
{
//RegisterStartRecord(r);
_max = 0;
_best = null;
_current = r;
}
示例2: GetResultPath
private static string GetResultPath(IRecord record)
{
var candidate = record.Path;
if (candidate.Contains(" "))
return string.Format("\"{0}\"", candidate);
return candidate;
}
示例3: Serialize
public void Serialize(IRecord record)
{
var tr = record as ITypedRecord;
if (tr == null) throw new NotSupportedException();
var info = tr.GetInfo();
var value = record.Value;
var count = value.Count;
//_s.WriteLine(count);
for (int i = 0; i < count; i++)
{
_s.Write(info.GetKey(i));
var x = value[i];
if(x != null)
{
var xr = x as IRecord;
if(xr == null)
{
_s.Write('\t');
_s.Write(x.ToString());
_s.WriteLine();
}
else
{
_s.WriteLine('\\');
Serialize(xr);
}
}
}
}
示例4: Matches
public new void Matches(IRecord r1, IRecord r2, double confidence)
{
if (confidence > _max)
{
_max = confidence;
_best = r2;
}
}
示例5: FilterByType
private bool FilterByType(IRecord record)
{
if (_types.Count == 0) // there is no filtering
return true;
bool found = false;
return record.GetValues(RDF_TYPE).Any(value => _types.Contains(value));
}
示例6: Update
/// <summary>
/// Updates the specified record.
/// </summary>
/// <param name="record">The record.</param>
public void Update(IRecord record)
{
TraceInfo("{0} - {1}", record, this);
if (record.IsNew)
{
OnUpdateNewRecord(record);
}
OnUpdateRecord(record);
}
示例7: OnUpdateRecord
/// <summary>
/// Called when the record is to be updated
/// </summary>
/// <param name="record">The record.</param>
protected override void OnUpdateRecord(IRecord record)
{
int iOne = record.GetFieldValue<int>("One", 0);
int iTwo = record.GetFieldValue<int>("Two", 0);
int iThree = record.GetFieldValue<int>("Three", 0);
record.SetFieldValue<int>("One + Two", iOne + iTwo);
record.SetFieldValue<int>("One + Three", iOne + iThree);
}
示例8: CreateContent
protected IContent CreateContent(IRecord record)
{
var contentFactory = Diffusion.Content;
// Create Content wrapping the Record
var recordContentBuilder = contentFactory.NewBuilder<IRecordContentBuilder>();
recordContentBuilder.PutRecords(record); // because PutRecord doesn't work
return recordContentBuilder.Build();
}
示例9: OnUpdateRecord
/// <summary>
/// Called when the record is to be updated
/// </summary>
/// <param name="record">The record.</param>
protected override void OnUpdateRecord(IRecord record)
{
bool refresh = record.GetFieldValue<bool>("Refresh Material", false);
if (refresh)
{
UpdateMaterialFields(record);
record.SetFieldValue("Refresh Material", false);
}
}
示例10: GetStoreForRecord
public LocalRecordStore GetStoreForRecord(IRecord record)
{
if (record == null)
{
throw new ArgumentException(null);
}
return this.EnsureRecordStoreObject(record);
}
示例11: UpdateMaterialFields
/// <summary>
/// Updates the lookup.
/// </summary>
/// <param name="record">The record.</param>
protected void UpdateMaterialFields(IRecord record)
{
string materialCode = record.GetFieldValue<string>("Material Code", null);
if (!string.IsNullOrEmpty(materialCode))
{
string vendor = materialService.GetVendor(materialCode);
record.SetFieldValue("Material Vendor", vendor);
}
}
示例12: DownloadAsync
public IAsyncAction DownloadAsync(IRecord record, IOutputStream destination)
{
if (record == null)
{
throw new ArgumentNullException("record");
}
return record.DownloadBlob(this, destination);
}
示例13: OnUpdateRecord
protected override void OnUpdateRecord(IRecord record)
{
UpdateWeightAndPercentage(record, coarseMeasurements, "Coarse Coke Weight ({0})", "Coarse Coke Percentage ({0})");
UpdateWeightAndPercentage(record, mediumMeasurements, "Medium Coke Weight ({0})", "Medium Coke Percentage ({0})");
UpdateWeightAndPercentage(record, fineMeasurements, "Fine Coke Weight ({0})", "Fine Coke Percentage ({0})");
UpdateWeightAndPercentage(record, ballmillMeasurements, "Ball Mill Product Weight ({0})", "Ball Mill Product Percentage ({0})");
UpdateWeightAndPercentage(record, coarseButtMeasurements, "Coarse Butt Weight ({0})", "Coarse Butt Percentage ({0})");
UpdateWeightAndPercentage(record, fineButtMeasurements, "Fine Butt Weight ({0})", "Fine Butt Percentage ({0})");
}
示例14: Evaluate
public string Evaluate(IRecord record)
{
IOwner parent = EntityFactory.GetById<IOwner>(_ownerId);
if(parent == null)
throw new Exception("Owner id " + _ownerId + " not found");
StringBuilder buf = new StringBuilder();
GetAllTeamMemberEmails(parent, buf);
return buf.ToString();
}
示例15: MapList
internal static void MapList(IRecord record, List<SpamKeyword> list)
{
SpamKeyword m = new SpamKeyword();
m.Id = record.GetInt32OrDefault(0, 0);
m.Keyword = record.GetStringOrEmpty(1);
m.Status = record.GetInt32OrDefault(2, 0);
m.AddUserID = record.GetInt32OrDefault(3, 0);
m.AddDate = record.GetDateTime(4);
list.Add(m);
}