当前位置: 首页>>代码示例>>C#>>正文


C# ContextType类代码示例

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


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


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