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


C# ICommandProcessor类代码示例

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


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


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