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

C# Visitor类代码示例

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

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



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

示例1: Accept

 public void Accept(Visitor visitor)
 {
     foreach (Employee e in employees)
     {
         e.Accept(visitor);
     }
 }
开发者ID:jiabailie,项目名称:self-projects,代码行数:7,代码来源:VisitorApp.cs


示例2: AcceptVisitor

 public void AcceptVisitor(Visitor visitor)
 {
     for(int y = 0; y < SectionHeight; ++y) {
         for(int x = 0; x < SectionWidth; ++x)
             sections[x, y].AcceptVisitor(visitor);
     }
 }
开发者ID:jaggedsoft,项目名称:aesirtk,代码行数:7,代码来源:MapDocument.cs


示例3: button1_Click

        // Добавление гостя в спискок
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Visitor visitor = new Visitor();

                visitor.Surname = textBox2.Text;
                visitor.Name = textBox3.Text;
                visitor.Patronymic = textBox6.Text;
                visitor.Country = textBox4.Text;
                visitor.City = textBox5.Text;
                visitor.Num = num;
                visitor.Birthday = dateTimePicker2.Value;

                if (visitor.Surname == "" || visitor.Name == "" || visitor.Country == "" || visitor.City == "")
                    throw new ArgumentException("Все поля (кроме отчества) должны быть заполнены.");

                visitors.Add(visitor);

                string s = visitor.Surname + " " + visitor.Name;
                textBox1.AppendText(s + "\n");
                comboBox1.Items.Add(s);

                textBox2.Clear();
                textBox3.Clear();
                textBox6.Clear();
            }
            catch (ArgumentException exc)
            {
                MessageBox.Show(exc.Message, "Регистрация гостя", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
开发者ID:sasha-bogma,项目名称:ilab,代码行数:33,代码来源:RegistrationForm.cs


示例4: FindVisitorCo

    IEnumerator FindVisitorCo()
    {
        if (King.visitor == null)
            yield return null;

        visitor = King.visitor;
    }
开发者ID:hassank,项目名称:WendyWebVR,代码行数:7,代码来源:PotionBook.cs


示例5: Should_map_Visitor

        public void Should_map_Visitor()
        {
            new DatabaseTester().Clean();
            var visitor = new Visitor
            {
                Browser = "1",
                IpAddress = "2",
                LoginName = "3",
                PathAndQuerystring = "4",
                VisitDate =
                    new DateTime(2000, 1, 1),
                FirstName = "Jones"
            };

            var repository = new VisitorRepository();
            repository.Save(visitor);

            Visitor loadedVisitor;
            using (ISession session = DataContext.GetSession())
            {
                loadedVisitor = session.Load<Visitor>(visitor.Id);
            }

            loadedVisitor.ShouldNotBeNull();
            loadedVisitor.Browser.ShouldEqual("1");
            loadedVisitor.IpAddress.ShouldEqual("2");
            loadedVisitor.LoginName.ShouldEqual("3");
            loadedVisitor.PathAndQuerystring.ShouldEqual("4");
            loadedVisitor.VisitDate.ShouldEqual(new DateTime(2000, 1, 1));
            loadedVisitor.FirstName.ShouldEqual("Jones");
        }
开发者ID:jbasilio,项目名称:IterationZero,代码行数:31,代码来源:VisitorMappingTester.cs


示例6: Action

 /// <summary>
 /// 对象结构执行访问,对池中所有的元素访问
 /// </summary>
 /// <param name="visitor"></param>
 public void Action(Visitor visitor)
 {
     foreach (Element e in elements)
     {
         e.Accept(visitor);
     }
 }
开发者ID:chengn,项目名称:DPRun,代码行数:11,代码来源:ObjectStructure.cs


示例7: Import

 public Formatting.ParagraphModel Import(IExchangableText text, ParagraphStyle paragraphStyle)
 {
     var visitor = new Visitor();
     visitor.BeginParagraph(_latinWordMetric, paragraphStyle);
     text.Accept(visitor);
     return visitor.EndParagraph();
 }
开发者ID:karak,项目名称:Geovanni,代码行数:7,代码来源:ExchangableTextImporter.cs


示例8: IsInCohort

 public override bool IsInCohort(Visitor visitor)
 {
     if (visitor.FirstVisit >= this.StartDate && visitor.FirstVisit <= this.EndDate)
     {
         return true;
     }
     return false;
 }
开发者ID:codeyu,项目名称:mtelligent,代码行数:8,代码来源:FirstVisitCohort.cs


示例9: Convert

 public static QueryComplete Convert(
     Expression<Func<BsonDocument, bool>> expression
     )
 {
     var visitor = new Visitor();
     visitor.Visit(expression);
     return (QueryComplete) visitor.ResultStack.Pop();
 }
开发者ID:rmueller,项目名称:LinqToMongo,代码行数:8,代码来源:ExpressionToQueryConverter.cs


示例10: IsInCohort

 public override bool IsInCohort(Visitor visitor)
 {
     if (visitor.LandingUrls.Where(a => a.IndexOf(this.LandingUrl) > -1).FirstOrDefault() != null)
     {
         return true;
     }
     return false;
 }
开发者ID:codeyu,项目名称:mtelligent,代码行数:8,代码来源:LandingUrlCohort.cs


示例11: accept

        public bool accept(Visitor visitor)
        {
            if (visitor.visitEnter(this))
            {

            }
            return visitor.visitLeave(this);
        }    
开发者ID:galderli,项目名称:dp2compiler,代码行数:8,代码来源:FunctionCall.cs


示例12: IsInCohort

 public override bool IsInCohort(Visitor visitor)
 {
     if (visitor.Roles.IndexOf(this.Role) > -1)
     {
         return true;
     }
     return false;
 }
开发者ID:codeyu,项目名称:mtelligent,代码行数:8,代码来源:RoleCohort.cs


示例13: TransferStateTo

 public override void TransferStateTo(Visitor targetVisitor){
   base.TransferStateTo(targetVisitor);
   Scoper target = targetVisitor as Scoper;
   if (target == null) return;
   target.ScopeFor = this.ScopeFor;
   target.currentScope = this.currentScope;
   target.currentModule = this.currentModule;
 }
开发者ID:tapicer,项目名称:resource-contracts-.net,代码行数:8,代码来源:Scoper.cs


示例14: accept

 public bool accept(Visitor visitor)
 {
     if (visitor.visitEnter(this))
     {
         expression.accept(visitor);
     }
     return visitor.visitLeave(this);
 }
开发者ID:galderli,项目名称:dp2compiler,代码行数:8,代码来源:ExpressionStatement.cs


示例15: IsInCohort

 public override bool IsInCohort(Visitor visitor)
 {
     if (visitor.IsAuthenticated)
     {
         return false;
     }
     return true;
 }
开发者ID:codeyu,项目名称:mtelligent,代码行数:8,代码来源:NonAuthenticatedUsersCohort.cs


示例16: Index

        public ActionResult Index(string actionName, string areaName, Dictionary<string, string> dic = null)
        {
            var visitor = new Visitor(areaName, actionName, new Guid(User.Identity.Name));

            var result = visitor.Parser(dic);

            return Json(result);

        }
开发者ID:key-value,项目名称:Eagle.First,代码行数:9,代码来源:ChannelController.cs


示例17: TransferStateTo

 public override void TransferStateTo(Visitor targetVisitor){
   base.TransferStateTo(targetVisitor);
   Declarer target = targetVisitor as Declarer;
   if (target == null) return;
   target.scope = this.scope;
   target.targetFor = this.targetFor;
   target.localLabels = this.localLabels;
   target.labelList = this.labelList;
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:9,代码来源:Declarer.cs


示例18: MapVisitors

 /// <summary>
 /// Maps the visitors.
 /// </summary>
 /// <param name="visitor">The visitor.</param>
 /// <param name="alerts">The alerts.</param>
 /// <param name="personAlerts">The person alerts.</param>
 /// <param name="alertTypeList">The alert Type Master List.</param>
 internal static void MapVisitors(Visitor visitor, ListResult<DataAccess.Entities.Alert> alerts, ListResult<DataAccess.Entities.PersonAlert> personAlerts, ListResult<DataAccess.Entities.AlertType> alertTypeList)
 {
     var alertCollection = AlertMapper.MapCollection(alerts.Items, personAlerts.Items, visitor.VisitorId, alertTypeList);
     if (alertCollection != null && alertCollection.Count > 0)
     {
         visitor.HasAlert = true;
         visitor.AssignAlerts(alertCollection);
     }
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:16,代码来源:PersonAlertMapper.cs


示例19: Arrange

        public void Arrange()
        {
            _visitor = new Visitor("SomeSessionId");
            _visitorsByDateRepository = new VisitorsPerDayRepository();
            _siteVisitRepository = new SiteVisitRepository();

            _reporter = new VisitorsPerDayReportWriter(_siteVisitRepository,_visitorsByDateRepository);
            _visitRecorder = new VisitRecorderService(_siteVisitRepository);
        }
开发者ID:elliottohara,项目名称:Blogs,代码行数:9,代码来源:Visitor_tests.cs


示例20: Process

 public string Process(IColorable firstColorable, IColorable secondColorable)
 {
     // Фактически исходная задача не решена, т.к. мы лишь определяем во времени выполении тип параметров,
     // но не выбор одной из полиморфных перегрузок ниже
     var visitor = new Visitor();
     firstColorable.IdentifyItself(visitor);
     secondColorable.IdentifyItself(visitor);
     return visitor.ColorCombination;
 }
开发者ID:Confirmit,项目名称:Students,代码行数:9,代码来源:Processor.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# VistaDBCommand类代码示例发布时间:2022-05-24
下一篇:
C# VisionViewBase类代码示例发布时间: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