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

C# ICommandProcessor类代码示例

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

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



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

示例1: Open

    public void Open(Lifetime lifetime, IShellLocks shellLocks, ChangeManager changeManager, ISolution solution, DocumentManager documentManager, IActionManager actionManager, ICommandProcessor commandProcessor, TextControlChangeUnitFactory changeUnitFactory, JetPopupMenus jetPopupMenus)
    {
      Debug.Assert(!IsOpened);

      _solution = solution;
      DocumentManager = documentManager;
      _jetPopupMenus = jetPopupMenus;
      changeManager.Changed2.Advise(lifetime, Handler);
      lifetime.AddAction(Close);
      var expandAction = actionManager.Defs.TryGetActionDefById(GotoDeclarationAction.ACTION_ID);
      if (expandAction != null)
      {
        var postfixHandler = new GotoDeclarationHandler(lifetime, shellLocks, commandProcessor, changeUnitFactory, this);

        lifetime.AddBracket(
          FOpening: () => actionManager.Handlers.AddHandler(expandAction, postfixHandler),
          FClosing: () => actionManager.Handlers.RemoveHandler(expandAction, postfixHandler));
      }
      
      var findUsagesAction = actionManager.Defs.GetActionDef<FindUsagesAction>();
      var findUsagesHandler = new FindUsagesHandler(lifetime, shellLocks, commandProcessor, changeUnitFactory, this);

      lifetime.AddBracket(
        FOpening: () => actionManager.Handlers.AddHandler(findUsagesAction, findUsagesHandler),
        FClosing: () => actionManager.Handlers.RemoveHandler(findUsagesAction, findUsagesHandler));
    }
开发者ID:derigel23,项目名称:Nitra,代码行数:26,代码来源:Solution.cs


示例2: JavaScriptRunner

        public JavaScriptRunner(IFeedback<LogEntry> log, ICommandProcessor commandProcessor, IEntityContextConnection entityContextConnection)
        {
            if (log == null)
                throw new ArgumentNullException("log");

            if (commandProcessor == null)
                throw new ArgumentNullException("commandProcessor");

            if (entityContextConnection == null)
                throw new ArgumentNullException("entityContextConnection");

            Log = log;
            CommandProcessor = commandProcessor;
            EntityContextConnection = entityContextConnection;
            log.Source = "JavaScript Runner";

            JintEngine = new Jint.Engine(cfg =>
            {
                cfg.AllowClr();
                cfg.AllowDebuggerStatement(JavascriptDebugEnabled);
            });
            //JintEngine.Step += async (s, info) =>
            //{
            //    await Log.ReportInfoFormatAsync(CancellationToken.None, "{1} {2}",
            //         info.CurrentStatement.Source.Start.Line,
            //         info.CurrentStatement.Source.Code.Replace(Environment.NewLine, ""));
            //};

        }
开发者ID:m19brandon,项目名称:zVirtualScenes,代码行数:29,代码来源:JavaScriptRunner.cs


示例3: TransmitPipe

 public TransmitPipe(ILoggerFactoryAdapter loggerFactoryAdapter, IConfiguration configuration, ICommandProcessor commandProcessor, IRegisterContainer registerContainer, GpioPin cePin)
 {
     _configuration = configuration;
     _commandProcessor = commandProcessor;
     _registerContainer = registerContainer;
     _logger = loggerFactoryAdapter.GetLogger(GetType());
     _cePin = cePin;
 }
开发者ID:RodneyWimberly,项目名称:Windows.Devices.Radios.nRF24L01P,代码行数:8,代码来源:TransmitPipe.cs


示例4: CommandBase

        protected CommandBase(
            ICommandProcessor ParentCommandProcessor,
            ITerminal  Terminal)
        {
            _CommandProcessor = ParentCommandProcessor;

            _Terminal = Terminal;
        }
开发者ID:adamedx,项目名称:shango,代码行数:8,代码来源:Command.cs


示例5: FindUsagesHandler

 public FindUsagesHandler(Lifetime lifetime, IShellLocks shellLocks, ICommandProcessor commandProcessor, TextControlChangeUnitFactory changeUnitFactory, XXLanguageXXSolution nitraSolution)
 {
   _lifetime = lifetime;
   _shellLocks = shellLocks;
   _commandProcessor = commandProcessor;
   _changeUnitFactory = changeUnitFactory;
   _nitraSolution = nitraSolution;
 }
开发者ID:derigel23,项目名称:Nitra,代码行数:8,代码来源:FindUsagesHandler.cs


示例6: RegisterProcessor

		public void RegisterProcessor (CommandType type, ICommandProcessor processor)
		{
			if (processors.ContainsKey (type))
				throw new ArgumentException (string.Format ("Command processor for type {0} is already registered", type));

			if (processor != null)
				processors [type] = processor;
		}
开发者ID:sdgdsffdsfff,项目名称:hermes.net,代码行数:8,代码来源:DefaultCommandProcessorRegistry.cs


示例7: ArduinoDetails

 public ArduinoDetails(IRadio radio, ILoggerFactoryAdapter loggerFactory, IConfiguration configuration, ICommandProcessor commandProcessor, IRegisterContainer registerContainer)
 {
     _radio = radio;
     _logger = loggerFactory.GetLogger(GetType());
     _configuration = configuration;
     _commandProcessor = commandProcessor;
     _registerContainer = registerContainer;
 }
开发者ID:RodneyWimberly,项目名称:Windows.Devices.Radios.nRF24L01P,代码行数:8,代码来源:ArduinoDetails.cs


示例8: Serialize

        public static FFprobeSerializerResult Serialize(ICommandProcessor processor)
        {
            if (processor.Status == CommandProcessorStatus.Faulted)
            {
                return null;
            }

            var standardOutputString = processor.StdOut;
            var serializerResult = FFprobeSerializerResult.Create();

            var serializers = new List<IFFprobeSerializer>
                {
                    new FFprobeStreamSerializer(),
                    new FFprobeFormatSerializer()
                };

            serializers.ForEach(serializer =>
                {
                    var serializerStartIndex = 0;

                    while (serializerStartIndex > -1)
                    {
                        var searchingStartTag = string.Format("[{0}]", serializer.Tag);
                        var searchingEndTag = string.Format("[/{0}]", serializer.Tag);

                        var startTagIndex = standardOutputString.IndexOf(searchingStartTag, serializerStartIndex, StringComparison.OrdinalIgnoreCase);
                        if (startTagIndex == -1)
                        {
                            break;
                        }

                        var endTagIndex = standardOutputString.IndexOf(searchingEndTag, startTagIndex + 1, StringComparison.OrdinalIgnoreCase);
                        if (endTagIndex == -1)
                        {
                            break;
                        }

                        var startAt = startTagIndex + searchingStartTag.Length;
                        var lengthOf = endTagIndex - startAt;
                        var unserializedValueString = standardOutputString.Substring(startAt, lengthOf);

                        var rawSerializedValues = FFprobeGeneralSerializer.Serialize(unserializedValueString);

                        var serializedValues = serializer.Serialize(rawSerializedValues);

                        if (serializedValues != null)
                        {
                            var serializerResultItem = FFprobeSerializerResultItem.Create(serializer.Tag, serializedValues);

                            serializerResult.Results.Add(serializerResultItem);
                        }

                        serializerStartIndex = endTagIndex;
                    }
                });

            return serializerResult;
        }
开发者ID:karthik20522,项目名称:HudlFfmpeg,代码行数:58,代码来源:FfprobeSerialzier.cs


示例9: ProductsController

 public ProductsController(IProductTasks productTasks, ICategoryTasks categoryTasks, IProductsQuery productsQuery, 
     ICommandProcessor commandProcessor, ICaptchaTasks captchaTasks)
 {
     _productTasks = productTasks;
     _categoryTasks = categoryTasks;
     _productsQuery = productsQuery;
     _commandProcessor = commandProcessor;
     _captchaTasks = captchaTasks;
 }
开发者ID:nucleoid,项目名称:Template-Project,代码行数:9,代码来源:ProductsController.cs


示例10: Register

        public void Register(ICommandProcessor commandProcessor)
        {
            var cmd = commandProcessor.Key.ToUpper();

            if (_processors.ContainsKey(cmd))
                throw new Exception(string.Format("The processor for command '{0}' is already registered", cmd));

            _processors.Add(cmd, commandProcessor);
        }
开发者ID:AigizK,项目名称:lokad-data-platform,代码行数:9,代码来源:CommandProcessor.cs


示例11: OnSuccessAction

 public static void OnSuccessAction(ICommandFactory factory, ICommand command, ICommandProcessor results)
 {
     //results.StdOut
     // - contains the results ffmpeg command line
     System.Console.ForegroundColor = System.ConsoleColor.DarkMagenta;
     System.Console.WriteLine("Succcess");
     System.Console.WriteLine(results.StdOut);
     System.Console.ForegroundColor = System.ConsoleColor.White;
 }
开发者ID:simonbuehler,项目名称:HudlFfmpeg,代码行数:9,代码来源:AttachOnSuccessOnErrorEvents.cs


示例12: PipeRegisterBase

 protected PipeRegisterBase(ILoggerFactoryAdapter loggerFactoryAdapter, ICommandProcessor commandProcessor, byte address, byte length, byte[] defaultValue, byte pipeNumber, string name = "") :
     base(loggerFactoryAdapter, commandProcessor, length, address, defaultValue, name)
 {
     PipeNumber = pipeNumber;
     Name = string.Format("{0}{1}{2}",
                         GetType().Name,
                         PipeNumber,
                         string.IsNullOrEmpty(name) ? "" : string.Format(" ({0})", name));
     Logger = loggerFactoryAdapter.GetLogger(Name);
 }
开发者ID:RodneyWimberly,项目名称:Windows.Devices.Radios.nRF24L01P,代码行数:10,代码来源:PipeRegisterBase.cs


示例13: BullsAndCowsGame

 /// <summary>
 /// Initializes a new instance of the BullsAndCowsGame class.
 /// </summary>
 /// <param name="randomNumberProvider">The randomNumberProvider used to generate random numbers.</param>
 /// <param name="scoreboard">The scoreboard used to hold player's scores.</param>
 /// <param name="printer">The printer used for printing messages and different objects.</param>
 /// <param name="commandProcessor">The first command processor in the chain of responsibility.</param>
 public BullsAndCowsGame(
     IRandomNumberProvider randomNumberProvider,
     ScoreBoard scoreboard,
     IPrinter printer,
     ICommandProcessor commandProcessor)
 {
     this.RandomNumberProvider = randomNumberProvider;
     this.ScoreBoard = scoreboard;
     this.Printer = printer;
     this.CommandProcessor = commandProcessor;
 }
开发者ID:shunobaka,项目名称:HQC-Teamwork-Project,代码行数:18,代码来源:BullsAndCowsGame.cs


示例14: ReceivePipe

 public ReceivePipe(ILoggerFactoryAdapter loggerFactoryAdapter, IConfiguration configuration, ICommandProcessor commandProcessor, IRegisterContainer registerContainer, IReceivePipeCollection parent, int pipeId)
 {
     if (PipeId > 5)
         throw new ArgumentOutOfRangeException(nameof(pipeId), "Invalid PipeId number for this Pipe");
     _logger = loggerFactoryAdapter.GetLogger(string.Format("{0}{1}", GetType().Name, pipeId));
     _configuration = configuration;
     _commandProcessor = commandProcessor;
     _registerContainer = registerContainer;
     _parent = parent;
     PipeId = pipeId;
 }
开发者ID:RodneyWimberly,项目名称:Windows.Devices.Radios.nRF24L01P,代码行数:11,代码来源:ReceivePipe.cs


示例15: Serialize

        public static ContainerMetadata Serialize(ICommandProcessor processor)
        {
            if (processor.Status == CommandProcessorStatus.Faulted)
            {
                return null;
            }

            var standardOutputString = processor.StdOut;

            return JsonConvert.DeserializeObject<ContainerMetadata>(standardOutputString);
        }
开发者ID:kostyll,项目名称:HudlFfmpeg,代码行数:11,代码来源:FFprobeSerialzier.cs


示例16: ExpandPostfixTemplateHandler

     public ExpandPostfixTemplateHandler(
 [NotNull] TextControlChangeUnitFactory changeUnitFactory,
 [NotNull] PostfixTemplatesManager templatesManager,
 [NotNull] ILookupWindowManager lookupWindowManager,
 [NotNull] ICommandProcessor commandProcessor)
     {
         myChangeUnitFactory = changeUnitFactory;
         myLookupWindowManager = lookupWindowManager;
         myCommandProcessor = commandProcessor;
         myTemplatesManager = templatesManager;
     }
开发者ID:Restuta,项目名称:PostfixCompletion,代码行数:11,代码来源:PostfixTemplatesTracker.cs


示例17: CreateRecommendationModule

        public CreateRecommendationModule(ICommandProcessor commandProcessor)
        {
            Contract.Requires(commandProcessor != null);
            
            this.CommandProcessor = commandProcessor;
            
            this.Get[To.CreateRecommendation] = this.HandleGet;

            this.Post[From.CreateRecommendation, runAsync: true] = this.HandlePostWithCsrfValidation;
            
        }
开发者ID:davidmosborne,项目名称:Witchcraft,代码行数:11,代码来源:CreateRecommendationModule.cs


示例18: AddressPipeRegister

 public AddressPipeRegister(ILoggerFactoryAdapter loggerFactoryAdapter, ICommandProcessor commandProcessor, byte address, byte[] defaultValue, byte pipeNumber, string name = "") :
         base(loggerFactoryAdapter, commandProcessor, address, (byte)(pipeNumber <= 1 ? 5 : 1), defaultValue, pipeNumber, name)
 {
     bool transmitPipe = Address == RegisterAddresses.TX_ADDR;
     Name = string.Format("{0}{1}{2}{3}",
                          transmitPipe ? "Transmit" : "Receive",
                          GetType().Name,
                          transmitPipe ? "" : PipeNumber.ToString(),
                          string.IsNullOrEmpty(name) ? "" : string.Format(" ({0})", name));
     Logger = loggerFactoryAdapter.GetLogger(Name);
 }
开发者ID:RodneyWimberly,项目名称:Windows.Devices.Radios.nRF24L01P,代码行数:11,代码来源:AddressPipeRegister.cs


示例19: RegisterBase

 protected RegisterBase(ILoggerFactoryAdapter loggerFactoryAdapter, ICommandProcessor commandProcessor, int length, byte address, byte[] defaultValue, string name = "")
 {
     Logger = loggerFactoryAdapter.GetLogger(GetType());
     _syncRoot = new object();
     Buffer = new byte[length];
     Name = GetType().Name + (string.IsNullOrEmpty(name) ? "" : string.Format(" ({0})", name));
     CommandProcessor = commandProcessor;
     Length = length;
     Address = address;
     DefaultValue = defaultValue;
     IsDirty = false;
 }
开发者ID:RodneyWimberly,项目名称:Windows.Devices.Radios.nRF24L01P,代码行数:12,代码来源:RegisterBase.cs


示例20: Configuration

        public Configuration(ILoggerFactoryAdapter loggerFactoryAdapter, ICommandProcessor commandProcessor, IRegisterContainer registerContainer)
        {
            _logger = loggerFactoryAdapter.GetLogger(GetType());
            _commandProcessor = commandProcessor;
            _registerContainer = registerContainer;
            _payloadWidth = Constants.MaxPayloadWidth;

            // Attempt to set DataRate to 250Kbps to determine if this is a plus model
            DataRates oldDataRate = DataRate;
            DataRate = DataRates.DataRate250Kbps;
            _isPlusModel = DataRate == DataRates.DataRate250Kbps;
            DataRate = oldDataRate;

        }
开发者ID:RodneyWimberly,项目名称:Windows.Devices.Radios.nRF24L01P,代码行数:14,代码来源:Configuration.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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