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

C# ExecuteType类代码示例

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

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



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


示例16: LogCommandAsError

 private void LogCommandAsError(Exception exception, ExecuteType type)
 {
     var formatter = new SqlServerFormatter();
     SqlTiming timing = new SqlTiming(this, type, null);
     exception.Data["SQL"] = formatter.FormatSql(timing);
 }
开发者ID:bevacqua,项目名称:Swarm,代码行数:6,代码来源:RichErrorDbCommand.cs


示例17: GetExecutedCount

 /// <summary>
 /// Returns the number of sql statements of <paramref name="type"/> that were executed in all <see cref="Timing"/>s.
 /// </summary>
 private int GetExecutedCount(ExecuteType type)
 {
     return HasSqlTimings ? GetTimingHierarchy().Sum(t => t.GetExecutedCount(type)) : 0;
 }
开发者ID:jmaucher,项目名称:SStack,代码行数:7,代码来源:MiniProfiler.IDbProfiler.cs


示例18: ExecuteStart

 /// <summary>
 /// Tracks when 'command' is started.
 /// </summary>
 public static void ExecuteStart(this SqlProfiler sqlProfiler, DbCommand command, ExecuteType type)
 {
     if (sqlProfiler == null) return;
     sqlProfiler.ExecuteStartImpl(command, type);
 }
开发者ID:7sharp9,项目名称:ServiceStack,代码行数:8,代码来源:SqlProfiler.cs


示例19: ExecutedCount

 private int ExecutedCount(ExecuteType type)
 {
     return HasSqlTimings ? SqlTimings.Count(s => s.ExecuteType == type) : 0;
 }
开发者ID:TheProjecter,项目名称:seanhederman-rest-wcf-support,代码行数:4,代码来源:Timing.cs


示例20:

 Guid IMongoDbProfiler.ExecuteStart(string collectionName, IMongoQuery query, IMongoUpdate update, ExecuteType executeType)
 {
     return MongoProfiler.ExecuteStart(collectionName, query, update, executeType);
 }
开发者ID:brycekahle,项目名称:MiniProfiler,代码行数:4,代码来源:MiniProfiler.IDbProfiler.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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