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

C# ContextType类代码示例

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

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



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

示例1: ParserContext

 public ParserContext(bool objectsAllowed, LineTypes.Property[] properties, LineTypes.Component[] components, ContextType type)
 {
     this.ObjectsAllowed = objectsAllowed;
     this.Properties = properties;
     this.Components = components;
     this.Type = type;
 }
开发者ID:Bullshitzu,项目名称:SGU,代码行数:7,代码来源:ParserContext.cs


示例2: getConfig

 /// <summary>
 /// Get Configuration data for selected context.
 /// </summary>
 /// <param name="context">Context for using.</param>
 /// <returns></returns>
 public ISolutionEvents getConfig(ContextType context)
 {
     if(configs.ContainsKey(context)) {
         return configs[context];
     }
     return new SolutionEvents();
 }
开发者ID:3F,项目名称:vsCommandEvent,代码行数:12,代码来源:RestoreData.cs


示例3: WriteContextInitialization

 public void WriteContextInitialization(ContextType contextType)
 {
     _transport.SendOperation(OperationCode.SetupContext, new Dictionary<byte, object>
     {
         [(byte) OperationParameterCode.ContextType] = contextType
     });
 }
开发者ID:rioter00,项目名称:Project-Ethos,代码行数:7,代码来源:NetworkOperationWriter.cs


示例4: GetContext

        public IFiber GetContext(ContextType contextType)
        {
            IFiber fiber = null;
            switch (contextType)
            {
                case ContextType.New:
                    fiber = new PoolFiber();
                    fiber.Start();
                    //poolfibers.Add(fiber);
                    break;
                case ContextType.Gui:
                    //if(formFiber == null)
                    //{
                    //    if (marshaler == null) marshaler = new MarshalingControl();
                    //    formFiber = new FormFiber(marshaler, new BatchAndSingleExecutor());
                    //    formFiber.Start();
                    //}

                    //fiber = formFiber;

                    fiber = GetStartedGuiFiber();
                    break;
            }

            return fiber;
        }
开发者ID:andalera,项目名称:TailSentry,代码行数:26,代码来源:ContextFactory.cs


示例5: JsonReaderContext

 internal JsonReaderContext(
     JsonReaderContext parentContext,
     ContextType contextType
 ) {
     this.parentContext = parentContext;
     this.contextType = contextType;
 }
开发者ID:redforks,项目名称:mongo-csharp-driver,代码行数:7,代码来源:JsonReaderContext.cs


示例6: getUserConfig

 /// <summary>
 /// Get User-Configuration data for selected context.
 /// </summary>
 /// <param name="context">Context for using.</param>
 /// <returns></returns>
 public IUserData getUserConfig(ContextType context)
 {
     if(userConfigs.ContainsKey(context)) {
         return userConfigs[context];
     }
     return new UserData();
 }
开发者ID:3F,项目名称:vsCommandEvent,代码行数:12,代码来源:RestoreData.cs


示例7: BsonBinaryReaderContext

 // constructors
 internal BsonBinaryReaderContext(BsonBinaryReaderContext parentContext, ContextType contextType, int startPosition, int size)
 {
     this.parentContext = parentContext;
     this.contextType = contextType;
     this.startPosition = startPosition;
     this.size = size;
 }
开发者ID:kamaradclimber,项目名称:mongo-csharp-driver,代码行数:8,代码来源:BsonBinaryReaderContext.cs


示例8: GetDateFromDay

 /// <summary>
 /// This method accepts a day of the week and returns the corresponding date depending on what the preposition is.
 /// </summary>
 /// <param name="preposition">The prefix specifying how many weeks to add to the next found day.</param>
 /// <param name="desiredDay">The required day.</param>
 /// <returns>Date on which the <var>preposition</var> <var>desiredDay</var> is found.</returns>
 private static DateTime GetDateFromDay(ContextType preposition, DayOfWeek desiredDay)
 {
     DateTime startDate;
     DateTime todayDate = DateTime.Today;
     int daysToAdd = GetDaysToAdd(todayDate.DayOfWeek, desiredDay);
     switch (preposition)
     {
         case ContextType.CURRENT:
             break;
         case ContextType.NEXT:
             Logger.Info("preposition is NEXT", "GetDateFromDay::TokenDay");
             daysToAdd += 7;
             break;
         case ContextType.FOLLOWING:
             Logger.Info("preposition is FOLLOWING", "GetDateFromDay::TokenDay");
             daysToAdd += 14;
             break;
         default:
             Logger.Error("Fell through preposition switch statement.", "GetDateFromDay::TokenDay");
             Debug.Assert(false, "Fell through switch statement in GetDateFromDay!");
             break;
     }
     startDate = todayDate.AddDays(daysToAdd);
     Logger.Info("Updated startDate", "GetDateFromDay::TokenDay");
     return startDate;
 }
开发者ID:soulslicer,项目名称:ToDoPlusPlus,代码行数:32,代码来源:TokenDay.cs


示例9: BsonDocumentReaderContext

 // used by Clone
 private BsonDocumentReaderContext(BsonDocumentReaderContext parentContext, ContextType contextType, BsonDocument document, BsonArray array, int index)
 {
     this.parentContext = parentContext;
     this.contextType = contextType;
     this.document = document;
     this.array = array;
     this.index = index;
 }
开发者ID:kamaradclimber,项目名称:mongo-csharp-driver,代码行数:9,代码来源:BsonDocumentReaderContext.cs


示例10: NotifierRule

 public NotifierRule(HotItem item, RuleType type, int value, ContextType contextType, INotificationHost host)
 {
     this.Host = host;
     this.Money = new Money(0, 0, value) { Name = "Rule" };
     this.Item = item;
     this.SelectedRuleType = type;
     this.ContextType = contextType;
 }
开发者ID:Zicore,项目名称:TradingPostNotifier,代码行数:8,代码来源:NotifierRule.cs


示例11: ChangePasswordController

 public ChangePasswordController()
 {
     _domainDisplayName = ConfigurationManager.AppSettings["domainDisplayName"];
     _contextType = (ContextType)Enum.Parse(typeof(ContextType), ConfigurationManager.AppSettings["contextType"], true);
     _domain = ConfigurationManager.AppSettings["domain"];
     _container = ConfigurationManager.AppSettings["container"];
     _identityType = (IdentityType)Enum.Parse(typeof(IdentityType), ConfigurationManager.AppSettings["identityType"], true);
 }
开发者ID:choffmeister,项目名称:changepwd-webfrontend,代码行数:8,代码来源:ChangePasswordController.cs


示例12: BsonDocumentReaderContext

 // used by Clone
 private BsonDocumentReaderContext(BsonDocumentReaderContext parentContext, ContextType contextType, BsonDocument document, BsonArray array, int index)
 {
     _parentContext = parentContext;
     _contextType = contextType;
     _document = document;
     _array = array;
     _index = index;
 }
开发者ID:moonreplace,项目名称:mongo-csharp-driver,代码行数:9,代码来源:BsonDocumentReaderContext.cs


示例13: DurableInstanceContextReplyChannel

 public DurableInstanceContextReplyChannel(ChannelManagerBase channelManager,
     ContextType contextType,
     IReplyChannel innerChannel)
     : base(channelManager, innerChannel)
 {
     this.contextType = contextType;
     this.innerReplyChannel = innerChannel;
 }
开发者ID:spzenk,项目名称:sfdocsamples,代码行数:8,代码来源:DurableInstanceContextReplyChannel.cs


示例14: ContextSpan

 public ContextSpan(int start, int end, Context context, Context parentContext, ContextType type)
 {
     Start = start;
     End = end;
     Context = context;
     ParentContext = parentContext;
     Type = type;
 }
开发者ID:ChinaJason,项目名称:Typewriter,代码行数:8,代码来源:ContextSpan.cs


示例15: BsonDocumentWriterContext

 // constructors
 internal BsonDocumentWriterContext(
     BsonDocumentWriterContext parentContext,
     ContextType contextType,
     BsonDocument document)
 {
     _parentContext = parentContext;
     _contextType = contextType;
     _document = document;
 }
开发者ID:abel,项目名称:sinan,代码行数:10,代码来源:BsonDocumentWriterContext.cs


示例16: BsonDocumentWriterContext

 internal BsonDocumentWriterContext(
     BsonDocumentWriterContext parentContext,
     ContextType contextType,
     BsonArray array
 ) {
     this.parentContext = parentContext;
     this.contextType = contextType;
     this.array = array;
 }
开发者ID:redforks,项目名称:mongo-csharp-driver,代码行数:9,代码来源:BsonDocumentWriterContext.cs


示例17: BsonBinaryWriterContext

 // constructors
 internal BsonBinaryWriterContext(
     BsonBinaryWriterContext parentContext,
     ContextType contextType,
     int startPosition)
 {
     _parentContext = parentContext;
     _contextType = contextType;
     _startPosition = startPosition;
 }
开发者ID:abel,项目名称:sinan,代码行数:10,代码来源:BsonBinaryWriterContext.cs


示例18: DurableInstanceContextReplySessionChannel

 public DurableInstanceContextReplySessionChannel(ChannelManagerBase channelManager,
     ContextType contextType,
     IReplySessionChannel innerChannel)
     : base(channelManager, innerChannel)
 {
     this.contextType = contextType;
     this.innerReplySessionChannel = innerChannel;
     this.isFirstMessage = true;
     this.stateLock = new object();
 }
开发者ID:tian1ll1,项目名称:WPF_Examples,代码行数:10,代码来源:DurableInstanceContextReplySessionChannel.cs


示例19: GetContext

 public static DbContext GetContext(ContextType type)
 {
     switch (type)
     {
         case ContextType.AdventureWorks2012Context:
             return new AdventureWorks2012Entities();
         default:
             return null;
     }
 }
开发者ID:xareas,项目名称:Generic-UnitOfWork-Repository-EF,代码行数:10,代码来源:ContextFactory.cs


示例20: ApplyConfiguration

        public override void ApplyConfiguration(BindingElement bindingElement)
        {
            base.ApplyConfiguration(bindingElement);

            DurableInstanceContextBindingElement typedBindingElement =
                (DurableInstanceContextBindingElement)bindingElement;

            this.contextStoreLocation = typedBindingElement.ContextStoreLocation;
            this.contextType = typedBindingElement.ContextType;
        }
开发者ID:ssickles,项目名称:archive,代码行数:10,代码来源:DurableInstanceContextBindingElementSection.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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