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


C# ExecuteType类代码示例

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


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

示例1: ExecuteStartImpl

        /// <summary>
        /// Tracks when 'command' is started.
        /// </summary>
        public void ExecuteStartImpl(DbCommand command, ExecuteType type)
        {
            var id = Tuple.Create((object)command, type);
            var sqlTiming = new SqlTiming(command, type, Profiler);

            _inProgress[id] = sqlTiming;
        }
开发者ID:7sharp9,项目名称:ServiceStack,代码行数:10,代码来源:SqlProfiler.cs

示例2:

 void IDbProfiler.ExecuteFinish(DbCommand profiledDbCommand, ExecuteType executeType, System.Data.Common.DbDataReader reader)
 {
     if (reader == null)
     {
         watch.Stop();
     }
     ExecuteFinishCount++;
 }
开发者ID:net205,项目名称:MiniProfiler,代码行数:8,代码来源:CountingDbProfiler.cs

示例3: ExecuteStartImpl

        /// <summary>
        /// Tracks when 'command' is started.
        /// </summary>
        public Guid ExecuteStartImpl(string collectionName, object query, ExecuteType type)
        {
            var id = Guid.NewGuid();
            var mongoTiming = new MongoTiming(collectionName, query.ToString(), type, Profiler);

            _inProgress[id] = mongoTiming;
            return id;
        }
开发者ID:brycekahle,项目名称:MiniProfiler,代码行数:11,代码来源:MongoProfiler.cs

示例4: ExecuteCommand

        public static string ExecuteCommand( string ConnectionTypeName, string ConnectionString, string ConnectionStringName, string SqlCommand, ExecuteType ExecuteType )
        {
            string connstr = GetConnectionString( ConnectionString, ConnectionStringName );

            IDbConnection conn = CreateConnection( ConnectionTypeName );
            conn.ConnectionString = connstr;

            string result = RunCommand( conn, SqlCommand, ExecuteType );
            return result;
        }
开发者ID:robrich,项目名称:NAntTasks,代码行数:10,代码来源:SqlHelper.cs

示例5: PriorityToIndex

 public static int PriorityToIndex(ExecuteType priority)
 {
     switch (priority)
     {
         case ExecuteType.Implicit: return 0;
         case ExecuteType.ImplicitIfUnique: return 1;
         case ExecuteType.Explicit: return 2;
         default: return 0;
     }
 }
开发者ID:schultzisaiah,项目名称:just-gestures,代码行数:10,代码来源:ConvertValue.cs

示例6: GetCom

 public static ExecuteCom GetCom(ExecuteType _type)
 {
     switch (_type)
     {
         case ExecuteType.Damage:
         case ExecuteType.Cure:
         case ExecuteType.Buffer:
             break;
     }
     return null;
 }
开发者ID:scozirge,项目名称:AVentureCapital,代码行数:11,代码来源:ExecuteComFactory.cs

示例7: ExecuteFinishImpl

 /// <summary>
 /// Finishes profiling for 'command', recording durations.
 /// </summary>
 public void ExecuteFinishImpl(DbCommand command, ExecuteType type, DbDataReader reader = null)
 {
     var id = Tuple.Create((object)command, type);
     var current = _inProgress[id];
     current.ExecutionComplete(isReader: reader != null);
     SqlTiming ignore;
     _inProgress.TryRemove(id, out ignore);
     if (reader != null)
     {
         _inProgressReaders[reader] = current;
     }
 }
开发者ID:7sharp9,项目名称:ServiceStack,代码行数:15,代码来源:SqlProfiler.cs

示例8: ProfilerItem

        /// <summary>
        /// Creates a new SqlTiming to profile 'command'.
        /// </summary>
        public ProfilerItem(DbCommand command, ExecuteType executeType)
        {
            CommandText = AddSpacesToParameters(command.CommandText);
            Parameters = GetCommandParameters(command);
            ExecuteType = executeType;

            if (Profiler.ConfigurationSettings.StackTraceBreadCrumbConfiguration.IsEnabled)
                StackTraceBreadCrumb = GetStackTraceBreadCrumbs();

            StartDateTime = DateTime.Now;
            _totalStopWatch = Stopwatch.StartNew();
        }
开发者ID:RichCzyzewski,项目名称:SqlClientProfiler,代码行数:15,代码来源:ProfilerItem.cs

示例9: AddMongoTiming

        public static void AddMongoTiming(string commandString, long durationMilliseconds, ExecuteType executeType)
        {
            if (MiniProfiler.Current == null || MiniProfiler.Current.Head == null)
                return;

            MiniProfiler.Current.Head.AddCustomTiming(MongoMiniProfiler.CategoryName,
                new CustomTiming(MiniProfiler.Current, commandString)
                {
                    DurationMilliseconds = durationMilliseconds,
                    FirstFetchDurationMilliseconds = durationMilliseconds,
                    ExecuteType = executeType.ToString().ToLower()
                });
        }
开发者ID:BiYiTuan,项目名称:dotnet,代码行数:13,代码来源:ProfilerUtils.cs

示例10: SqlTiming

        /// <summary>
        /// Creates a new SqlTiming to profile 'command'.
        /// </summary>
        public SqlTiming(DbCommand command, ExecuteType type, MiniProfiler profiler)
        {
            Id = Guid.NewGuid();

            RawCommandString = CommandString = AddSpacesToParameters(command.CommandText);
            Parameters = GetCommandParameters(command);
            ExecuteType = type;

            if (!MiniProfiler.Settings.ExcludeStackTraceSnippetFromSqlTimings)
                StackTraceSnippet = Helpers.StackTraceSnippet.Get();

            _profiler = profiler;
            _profiler.AddSqlTiming(this);

            _startTicks = _profiler.ElapsedTicks;
            StartMilliseconds = MiniProfiler.GetRoundedMilliseconds(_startTicks);
        }
开发者ID:robertmilne,项目名称:MVC-Mini-Profiler,代码行数:20,代码来源:SqlTiming.cs

示例11: SqlTiming

        public SqlTiming(string commandText, ExecuteType type, MiniProfiler profiler)
        {
            Id = Guid.NewGuid();

            CommandString = AddSpacesToParameters(commandText);
            Parameters = new List<SqlTimingParameter>();
            ExecuteType = type;

            if (!MiniProfiler.Settings.ExcludeStackTraceSnippetFromSqlTimings)
                StackTraceSnippet = Helpers.StackTraceSnippet.Get();

            _profiler = profiler;
            if (_profiler != null)
            {
                _profiler.AddSqlTiming(this);
                _startTicks = _profiler.ElapsedTicks;
                StartMilliseconds = _profiler.GetRoundedMilliseconds(_startTicks);
            }
        }
开发者ID:brycekahle,项目名称:MiniProfiler,代码行数:19,代码来源:SqlTiming.cs

示例12: MongoTiming

        /// <summary>
        /// Creates a new SqlTiming to profile 'command'.
        /// </summary>
        public MongoTiming(string collectionName, string command, ExecuteType type, MiniProfiler profiler)
        {
            Id = Guid.NewGuid();

            CollectionName = collectionName;
            CommandString = command;
            ExecuteType = type;

            if (!MiniProfiler.Settings.ExcludeStackTraceSnippetFromSqlTimings)
                StackTraceSnippet = Helpers.StackTraceSnippet.Get();

            _profiler = profiler;
            if (_profiler != null)
            {
                _profiler.AddMongoTiming(this);
                _startTicks = _profiler.ElapsedTicks;
                StartMilliseconds = _profiler.GetRoundedMilliseconds(_startTicks);
            }
        }
开发者ID:brycekahle,项目名称:MiniProfiler,代码行数:22,代码来源:MongoTiming.cs

示例13: Execute

        public object Execute(
            TransactionChoice connType
            , CommandType commandType
            , string procedure
            , ExecuteType executeType
            , IList<SqlParameter> parameters
            , out ExecuteOutcome executeOutcome, out string executeOutcomeMessage)
        {
            object result = null;

            SqlCommand cmd = NewSqlCommand(connType, commandType, procedure, parameters);

            try
            {
                result = CommandExecute(executeType, cmd);
                executeOutcome = ExecuteOutcome.Success;
                executeOutcomeMessage = "";
            }
            catch (Exception ex)
            {
                if (ex.GetBaseException().Message.Contains("timeout") || ex.GetBaseException().Message.Contains("deadlock"))
                {
                    //return message that it timed out
                    executeOutcome = ExecuteOutcome.Timeout;
                    executeOutcomeMessage = "Server timed out or thread deadlock victim.  "
                           + ex.Message;
                }
                else
                {
                    executeOutcome = ExecuteOutcome.Failure;
                    throw ex;
                }
            }

            return result;
        }
开发者ID:ipduncan,项目名称:Refactor,代码行数:36,代码来源:SqlDataManager.cs

示例14:

 void IDbProfiler.OnError(DbCommand profiledDbCommand, ExecuteType executeType, Exception exception)
 {
     // TODO: implement errors aggregation and presentation
 }
开发者ID:jmaucher,项目名称:SStack,代码行数:4,代码来源:MiniProfiler.IDbProfiler.cs

示例15: GetExecutedCount

 /// <summary>
 /// Returns the number of sql statements of <paramref name="type"/> that were executed in this <see cref="Timing"/>.
 /// </summary>
 internal int GetExecutedCount(ExecuteType type)
 {
     return HasSqlTimings ? SqlTimings.Count(s => s.ExecuteType == type) : 0;
 }
开发者ID:7sharp9,项目名称:ServiceStack,代码行数:7,代码来源:Timing.cs


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