• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IRecord类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IRecord的典型用法代码示例。如果您正苦于以下问题:C# IRecord类的具体用法?C# IRecord怎么用?C# IRecord使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IRecord类属于命名空间,在下文中一共展示了IRecord类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: StartRecord

 public new void StartRecord(IRecord r)
 {
     //RegisterStartRecord(r);
     _max = 0;
     _best = null;
     _current = r;
 }
开发者ID:donners77,项目名称:DukeSharp,代码行数:7,代码来源:ChooseBestFilter.cs


示例2: GetResultPath

 private static string GetResultPath(IRecord record)
 {
     var candidate = record.Path;
     if (candidate.Contains(" "))
         return string.Format("\"{0}\"", candidate);
     return candidate;
 }
开发者ID:chinhdo,项目名称:Jump-Location,代码行数:7,代码来源:JumpLocationCommand.cs


示例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);
                    }
                }
            }
        }
开发者ID:ufcpp,项目名称:UfcppSample,代码行数:32,代码来源:MySerializer.cs


示例4: Matches

 public new void Matches(IRecord r1, IRecord r2, double confidence)
 {
     if (confidence > _max)
     {
         _max = confidence;
         _best = r2;
     }
 }
开发者ID:donners77,项目名称:DukeSharp,代码行数:8,代码来源:ChooseBestFilter.cs


示例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));
        }
开发者ID:donners77,项目名称:DukeSharp,代码行数:8,代码来源:RecordHandler.cs


示例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);
 }
开发者ID:JoePlant,项目名称:Ampla-Code-Items,代码行数:13,代码来源:RecordUpdater.cs


示例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);
        }
开发者ID:JoePlant,项目名称:Ampla-Code-Items,代码行数:13,代码来源:QualityFieldsRecordUpdater.cs


示例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();
        }
开发者ID:pushtechnology,项目名称:blog-steering-wheel,代码行数:9,代码来源:TopicSource.cs


示例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);
     }
 }
开发者ID:JoePlant,项目名称:Ampla-Code-Items,代码行数:13,代码来源:MaterialRecordUpdater.cs


示例10: GetStoreForRecord

 public LocalRecordStore GetStoreForRecord(IRecord record)
 {
     if (record == null)
     {
         throw new ArgumentException(null);
     }
     
     return this.EnsureRecordStoreObject(record);
 }
开发者ID:CHBase,项目名称:chbase-windows8-sdk,代码行数:9,代码来源:LocalRecordStoreTable.cs


示例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);
     }
 }
开发者ID:JoePlant,项目名称:Ampla-Code-Items,代码行数:13,代码来源:MaterialRecordUpdater.cs


示例12: DownloadAsync

        public IAsyncAction DownloadAsync(IRecord record, IOutputStream destination)
        {
            if (record == null)
            {
                throw new ArgumentNullException("record");
            }

            return record.DownloadBlob(this, destination);
        }
开发者ID:shashidharpalli,项目名称:Enabling-Programmable-Self-with-HealthVault,代码行数:9,代码来源:Blob.cs


示例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})");
 }
开发者ID:JoePlant,项目名称:Ampla-Code-Items,代码行数:9,代码来源:SieveAnalysisRecordUpdater.cs


示例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();
 }
开发者ID:PmeyerSwiftpage,项目名称:NotificationEngine,代码行数:9,代码来源:OwnerWorkItemTarget.cs


示例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);
 }
开发者ID:sidny,项目名称:d4d-studio,代码行数:10,代码来源:SpamKeywordDao.cs


示例16: LocalRecordStore

        public LocalRecordStore(IRecord record, StorageFolder folder, string encryptionKey)
        {
            IObjectStore store = new FolderObjectStore(folder);
            if (!String.IsNullOrEmpty(encryptionKey))
            {
                store = new EncryptedObjectStore(store, new Cryptographer(), encryptionKey);
            }

            Initialize(record, store, null);
        }
开发者ID:CHBase,项目名称:chbase-windows8-sdk,代码行数:10,代码来源:LocalRecordStore.cs


示例17: SynchronizedViewSynchronizer

 public SynchronizedViewSynchronizer(IRecord record, int maxAgeInSeconds)
 {
     if (record == null)
     {
         throw new ArgumentNullException("record");
     }
     m_record = record;
     this.MaxAgeInSeconds = maxAgeInSeconds;
     m_syncQueries = new List<ItemQuery>();
     m_queriesToRun = new List<ItemQuery>();
 }
开发者ID:CHBase,项目名称:chbase-windows8-sdk,代码行数:11,代码来源:SynchronizedViewSynchronizer.cs


示例18: MapBandInfoList

        internal static void MapBandInfoList(IRecord record, List<BandInfo> list)
        {
            BandInfo m = new BandInfo();
            m.BandId = record.GetInt32OrDefault(0, 0);
            m.BandName = record.GetStringOrEmpty(1);
            m.Info1 = record.GetStringOrEmpty(2);
            m.Info2 = record.GetStringOrEmpty(3);
            m.Info3 = record.GetStringOrEmpty(4);
            m.Remark = record.GetStringOrEmpty(5);

            list.Add(m);
        }
开发者ID:sidny,项目名称:d4d-studio,代码行数:12,代码来源:UserDao.cs


示例19: AddRecord

        /// <summary>
        /// Adds the record to the component's queue.
        /// </summary>
        /// <param name="record">The record.</param>
        public void AddRecord(IRecord record)
        {
            if (record == null)
            {
                return;
            }

            if (RecordCount++ < 1)
            {
                Offset = AddTrace("Starting Pledge Run...", DateTime.MinValue, ClientId);
            }

            var recordHasErrors = false;
            Rules.CurrentRecord = record;

            foreach (var rule in Rules)
            {
                var result = EvaluateRule(record, rule);
                if (result.Type != ResultType.Passed)
                {
                    DocumentHasErrors = true;
                    recordHasErrors = true;

                    //we're only reporting errors from the first 500 records to the UI (or caller) 
                    //as this is more than enough to indicate a really messed up file
                    if (ErrorCount < 500)
                    {
                        foreach (var message in result.Dispositions)
                        {
                            EventsManager.ReportRuleFailure(record.RowNumber, message.Annotation, ClientId);
                        }
                    }
                }
            }

            if (!recordHasErrors)
            {
                record.IsValid = true;
                DocumentHasValidRecords = true;
                PassCount++;
            }
            else
            {
                ErrorCount++;
            }

            Successor.AddRecord(record);

            if (RecordCount % EventCounter == 0)
            {
                UpdateProgress(RecordCount, ClientId);
            }
        }
开发者ID:tuvoksg1,项目名称:RulesEngine,代码行数:57,代码来源:Validator.cs


示例20: OnUpdateRecord

 /// <summary>
 /// Called when the record is to be updated
 /// </summary>
 /// <param name="record">The record.</param>
 protected override void OnUpdateRecord(IRecord record)
 {
     double source = record.GetFieldValue<double>(sourceField, 0);
     if (source > 0)
     {
         double log = System.Math.Log10(source);
         record.SetFieldValue<double>(logResultField, log);
     }
     else
     {
         TraceError("{0} - Unable to calculate ['{1}'] = Math.Log10({2})  ({2} = {3})", this, logResultField, sourceField, source);
     }
 }
开发者ID:JoePlant,项目名称:Ampla-Code-Items,代码行数:17,代码来源:LogFieldRecordUpdater.cs



注:本文中的IRecord类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IRecordVisitor类代码示例发布时间:2022-05-24
下一篇:
C# IReceiver类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap