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


C# CommandFlags类代码示例

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


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

示例1: CreateLongCommand

 internal static Command CreateLongCommand(string name, Func<FSharpOption<int>, Register, LongCommandResult> func, CommandFlags flags = CommandFlags.None)
 {
     var fsharpFunc = FSharpFuncUtil.Create(func);
     var list = name.Select(InputUtil.CharToKeyInput).ToFSharpList();
     var commandName = CommandName.NewManyKeyInputs(list);
     return Command.NewLongCommand(commandName, flags, fsharpFunc);
 }
开发者ID:ChrisMarinos,项目名称:VsVim,代码行数:7,代码来源:VimUtil.cs

示例2: Command

 /// <summary>
 /// Initializes a new instance of the <see cref="Command"/> class.
 /// </summary>
 /// <param name="flags">Command flags.</param>
 /// <param name="name">The command's name.</param>
 /// <param name="description">The command's description.</param>
 /// <param name="usage">The command's usage string.</param>
 /// <param name="helpMessage">The command's help message.</param>
 protected Command(CommandFlags flags, string name, string description, string usage, string helpMessage)
 {
     Name = name;
     Description = description;
     Usage = usage;
     HelpMessage = helpMessage;
     Flags = flags;
 }
开发者ID:medsouz,项目名称:HaloOnlineTagTool,代码行数:16,代码来源:Command.cs

示例3: Exists

 /// <summary>
 /// EXISTS http://redis.io/commands/exists
 /// </summary>
 public Task<bool> Exists(CommandFlags commandFlags = CommandFlags.None)
 {
     return TraceHelper.RecordReceive(Settings, Key, CallType, async () =>
     {
         var r = await Command.KeyExistsAsync(Key, commandFlags).ForAwait();
         return Tracing.CreateReceived(r, sizeof(bool));
     });
 }
开发者ID:cloud9-plus,项目名称:CloudStructures,代码行数:11,代码来源:RedisStructure.cs

示例4: Dispose

 public void Dispose()
 {
     if (Disposing != null)
         Disposing(this);
     Flags = CommandFlags.None;
     ValidateHnd = null;
     PrepareHnd = null;
     ExecuteHnd = null;
     FinishHnd = null;
 }
开发者ID:Basilid,项目名称:Spheres,代码行数:10,代码来源:GameObjectQueryDesc.cs

示例5: Common

 // private Properties.WidgetPropsManager _prop_man;
 // Constructor is 'protected'
 protected Common()
 {
     _cur_element = null;
     _cur_window = null;
     _obj_props_panel = null;
     _cur_action = CommandFlags.TB_NONE;
     _obj_tree_il = null;
     _py_editor = new mkdb.Python.PyFileEditor();
     // _prop_man = new mkdb.Properties.WidgetPropsManager();
 }
开发者ID:miquik,项目名称:mkdb,代码行数:12,代码来源:Common.cs

示例6: CommandDefinition

        /// <summary>
        /// Initialize the command definition
        /// </summary>
        public CommandDefinition(string commandText, object parameters = null, IDbTransaction transaction = null, int? commandTimeout = null,
                                 CommandType? commandType = null, CommandFlags flags = CommandFlags.Buffered
#if ASYNC
                                 , CancellationToken cancellationToken = default(CancellationToken)
#endif
            )
        {
            CommandText = commandText;
            Parameters = parameters;
            Transaction = transaction;
            CommandTimeout = commandTimeout;
            CommandType = commandType;
            Flags = flags;
#if ASYNC
            CancellationToken = cancellationToken;
#endif
        }
开发者ID:ServiceStack,项目名称:ServiceStack.OrmLite,代码行数:20,代码来源:CommandDefinition.cs

示例7: Combine

 public RedisValue[] Combine(SetOperation operation, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None)
 {
     return RedisSync.SetCombine(operation, first, second, flags);
 }
开发者ID:HyperSharp,项目名称:Hyperspace.Redis,代码行数:4,代码来源:RedisSet.cs

示例8: CombineAsync

 public Task<RedisValue[]> CombineAsync(SetOperation operation, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None)
 {
     return RedisAsync.SetCombineAsync(operation, first, second, flags);
 }
开发者ID:HyperSharp,项目名称:Hyperspace.Redis,代码行数:4,代码来源:RedisSet.cs

示例9: EvaluateAsync

        /// <summary>
        /// Evaluates this LoadedLuaScript against the given database, extracting parameters for the passed in object if any.
        /// 
        /// This method sends the SHA1 hash of the ExecutableScript instead of the script itself.  If the script has not
        /// been loaded into the passed Redis instance it will fail.
        /// </summary>
        public Task<RedisResult> EvaluateAsync(IDatabaseAsync db, object ps = null, RedisKey? withKeyPrefix = null, CommandFlags flags = CommandFlags.None)
        {
            RedisKey[] keys;
            RedisValue[] args;
            Original.ExtractParameters(ps, withKeyPrefix, out keys, out args);

            return db.ScriptEvaluateAsync(Hash, keys, args, flags);
        }
开发者ID:etrpreddy,项目名称:StackExchange.Redis,代码行数:14,代码来源:LuaScript.cs

示例10: CombineAndStoreAsync

 public Task<long> CombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None)
 {
     return RedisAsync.SetCombineAndStoreAsync(operation, destination, first, second, flags);
 }
开发者ID:HyperSharp,项目名称:Hyperspace.Redis,代码行数:4,代码来源:RedisSet.cs

示例11: Select

        private ServerEndPoint Select(int slot, RedisCommand command, CommandFlags flags)
        {
            flags = Message.GetMasterSlaveFlags(flags); // only intersted in master/slave preferences

            ServerEndPoint[] arr;
            if (slot == NoSlot || (arr = map) == null) return Any(command, flags);

            ServerEndPoint endpoint = arr[slot], testing;
            // but: ^^^ is the MASTER slots; if we want a slave, we need to do some thinking
            
            if (endpoint != null)
            {
                switch (flags)
                {
                    case CommandFlags.DemandSlave:
                        return FindSlave(endpoint, command) ?? Any(command, flags);
                    case CommandFlags.PreferSlave:
                        testing = FindSlave(endpoint, command);
                        if (testing != null) return testing;
                        break;
                    case CommandFlags.DemandMaster:
                        return FindMaster(endpoint, command) ?? Any(command, flags);
                    case CommandFlags.PreferMaster:
                        testing = FindMaster(endpoint, command);
                        if (testing != null) return testing;
                        break;
                }
                if (endpoint.IsSelectable(command)) return endpoint;
            }
            return Any(command, flags);
        }
开发者ID:carfaxad,项目名称:StackExchange.Redis,代码行数:31,代码来源:ServerSelectionStrategy.cs

示例12: Evaluate

        /// <summary>
        /// Evaluates this LuaScript against the given database, extracting parameters from the passed in object if any.
        /// </summary>
        public RedisResult Evaluate(IDatabase db, object ps = null, RedisKey? withKeyPrefix = null, CommandFlags flags = CommandFlags.None)
        {
            RedisKey[] keys;
            RedisValue[] args;
            ExtractParameters(ps, withKeyPrefix, out keys, out args);

            return db.ScriptEvaluate(ExecutableScript, keys, args, flags);
        }
开发者ID:etrpreddy,项目名称:StackExchange.Redis,代码行数:11,代码来源:LuaScript.cs

示例13: GetMenuMask

        public static CommandFlags GetMenuMask()
        {
            var pathToCheck = GetSelectedPath();

            if (pathToCheck == _lastCheckedPath)
                return _lastMenuMask;

            _lastCheckedPath = pathToCheck;
            _lastMenuMask = GetMenuMask(_lastCheckedPath);
            return _lastMenuMask;
        }
开发者ID:kthompson,项目名称:gitmenu,代码行数:11,代码来源:GitCommand.cs

示例14: GitCommand

 protected GitCommand(GitMenuPackage provider, int id, CommandFlags selection, string text)
     : base(new CommandID(GuidList.GuidGitMenuCmdSet, id), text)
 {
     this.Selection = selection;
     Package = provider;
 }
开发者ID:kthompson,项目名称:gitmenu,代码行数:6,代码来源:GitCommand.cs

示例15: Eval

 protected object Eval(string script, bool async = false, CommandFlags flags = CommandFlags.FireAndForget)
 {
     object result = null;
         var redisDatabase = GetRedisDatabase();
         if (async)
             redisDatabase.ScriptEvaluateAsync(script);
         else
             result = redisDatabase.ScriptEvaluate(script, null, null, flags);
         return result;
 }
开发者ID:njfife,项目名称:playground,代码行数:10,代码来源:RedisUnlockedStateStore.cs


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