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


C# Priority.ToString方法代码示例

本文整理汇总了C#中Priority.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Priority.ToString方法的具体用法?C# Priority.ToString怎么用?C# Priority.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Priority的用法示例。


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

示例1: Log

        /// <summary>
        /// Write a new log entry with the specified category and priority.
        /// </summary>
        /// <param name="message">Message body to log.</param>
        /// <param name="category">Category of the entry.</param>
        /// <param name="priority">The priority of the entry.</param>
        public void Log(string message, Category category, Priority priority)
        {
            string messageToLog = String.Format(CultureInfo.InvariantCulture, Resources.DefaultTextLoggerPattern, DateTime.Now,
                                                category.ToString().ToUpper(CultureInfo.InvariantCulture), message, priority.ToString());

            writer.WriteLine(messageToLog);
        }
开发者ID:eslahi,项目名称:prism,代码行数:13,代码来源:TextLogger.cs

示例2: Log

 public void Log(string message, Category category, Priority priority)
 {
     _bootLogger.Log(String.Format("{0}|{1}: {2}",
         FormatString(category.ToString(), 9),
         FormatString(priority.ToString(), 6),
         message));
 }
开发者ID:christal1980,项目名称:wingsoa,代码行数:7,代码来源:ServerBootLoggerAdapter.cs

示例3: LogException

 public void LogException(string message, Exception exception, Priority priority)
 {
     _bootLogger.Log(String.Format("{0}|{1}: {2}",
                     FormatString(Category.Exception.ToString(), 9),
                    FormatString(priority.ToString(), 6),
                    message), exception);
 }
开发者ID:christal1980,项目名称:wingsoa,代码行数:7,代码来源:ServerBootLoggerAdapter.cs

示例4: WithTaskPriority

 public InspectAllTapesSpectraS3Request WithTaskPriority(Priority? taskPriority)
 {
     this._taskPriority = taskPriority;
     if (taskPriority != null)
     {
         this.QueryParams.Add("task_priority", taskPriority.ToString());
     }
     else
     {
         this.QueryParams.Remove("task_priority");
     }
     return this;
 }
开发者ID:rpmoore,项目名称:ds3_net_sdk,代码行数:13,代码来源:InspectAllTapesSpectraS3Request.cs

示例5: WithPriority

 public CompactPoolSpectraS3Request WithPriority(Priority? priority)
 {
     this._priority = priority;
     if (priority != null)
     {
         this.QueryParams.Add("priority", priority.ToString());
     }
     else
     {
         this.QueryParams.Remove("priority");
     }
     return this;
 }
开发者ID:rpmoore,项目名称:ds3_net_sdk,代码行数:13,代码来源:CompactPoolSpectraS3Request.cs

示例6: Log

        /// <summary>
        /// Write a new log entry with the specified category and priority.
        /// </summary>
        /// <param name="message">Message body to log.</param>
        /// <param name="category">Category of the entry.</param>
        /// <param name="priority">The priority of the entry.</param>
        public void Log(string message, Category category, Priority priority)
        {
            var formattedMessage = string.Format("[{0}, {1}] {2}",
                category.ToString(), priority.ToString(), message);

            switch (category)
            {
                case Category.Debug:
                case Category.Info:
                    Trace.TraceInformation(formattedMessage);
                    break;
                case Category.Warn:
                    Trace.TraceWarning(formattedMessage);
                    break;
                case Category.Exception:
                    Trace.TraceError(formattedMessage);
                    break;
            }
        }
开发者ID:christal1980,项目名称:wingsoa,代码行数:25,代码来源:TraceLogger.cs

示例7: PrettyString

 public static string PrettyString(Priority p)
 {
     return p.ToString ().Replace ('_', ' ').ToLower ();
 }
开发者ID:rggjan,项目名称:Tomboy-Todo-List,代码行数:4,代码来源:Priority.cs

示例8: Create

        public int Create(string externalKey, string layoutHtml, Priority priority = Priority.Medium)
        {
            if (externalKey.Length > Guid.Empty.ToString().Length)
            {
                throw new ArgumentException(
                    "externalKey too long, should be max length of " + Guid.Empty.ToString().Length, "externalKey");
            }

            if (_triggeredSendDefinitionClient.DoesTriggeredSendDefinitionExist(externalKey))
            {
                throw new Exception(string.Format("A TriggeredSendDefinition with external key {0} already exsits",
                    externalKey));
            }

            var dataExtensionExternalKey = ExternalKeyGenerator.GenerateExternalKey("data-extension-" + externalKey);
            if (!_dataExtensionClient.DoesDataExtensionExist(dataExtensionExternalKey))
            {
                var dataExtensionTemplateObjectId =_dataExtensionClient.RetrieveTriggeredSendDataExtensionTemplateObjectId();
                var dataExtensionFieldNames = new HashSet<string> {"Subject"};

                var replacementFieldNames = LayoutHtmlReplacementFieldNameParser.Parse(layoutHtml);
                foreach (var replacementFieldName in replacementFieldNames)
                {
                    dataExtensionFieldNames.Add(replacementFieldName);
                }

                _dataExtensionClient.CreateDataExtension(dataExtensionTemplateObjectId,
                    dataExtensionExternalKey,
                    "triggeredsend-" + externalKey,
                    dataExtensionFieldNames);
            }

            var emailName = "email-" + externalKey;
            var emailExternalKey = ExternalKeyGenerator.GenerateExternalKey("email-" + externalKey);

            layoutHtml +=   EmailContentHelper.GetOpenTrackingTag() +
                            EmailContentHelper.GetCompanyPhysicalMailingAddressTags();

            var emailId = _emailRequestClient.CreateEmail(emailExternalKey, emailName, "%%Subject%%",
               layoutHtml);

            var deliveryProfileExternalKey = ExternalKeyGenerator.GenerateExternalKey("blank-delivery-profile");
            _deliveryProfileClient.TryCreateBlankDeliveryProfile(deliveryProfileExternalKey);

            return _triggeredSendDefinitionClient.CreateTriggeredSendDefinition(externalKey,
                emailId,
                dataExtensionExternalKey,
                deliveryProfileExternalKey,
                externalKey,
                externalKey,
                priority.ToString());
        }
开发者ID:dwarner99,项目名称:ExactTarget-triggered-email-sender,代码行数:52,代码来源:PasteHtmlEmailCreator.cs

示例9: CreateNotification

		/*
		 * Invoked when showNotificationButton is clicked.
		 * Creates a new notification and sets metadata passed as arguments.
		 */
		public Notification CreateNotification(Priority priority, Category category, Uri contactUri)
		{
			var builder = new Notification.Builder (Activity)
				.SetContentTitle ("Notification with other metadata")
				.SetSmallIcon (Resource.Drawable.ic_launcher_notification)
				.SetPriority ((int)priority.priority)
				.SetCategory (category.ToString ())
				.SetContentText(string.Format("Category {0}, Priority {1}",category.ToString(),priority.ToString()));
			if (contactUri != null) {
				builder.AddPerson (contactUri.ToString ());
				Bitmap photoBitmap = LoadBitmapFromContactUri (contactUri);
				if (photoBitmap != null)
					builder.SetLargeIcon (photoBitmap);
			}
			return builder.Build ();
		}
开发者ID:CHANDAN145,项目名称:monodroid-samples,代码行数:20,代码来源:OtherMetaDataFragment.cs

示例10: GetInsertString

 private string GetInsertString(TaskQueueData oTask, Priority ePriority)
 {
     string sData = TaskQueueData.SerializeToXml(oTask);
     return "INSERT INTO " + m_cstrTableName + " ( cq_data, cq_priority, cq_time, cq_isbusy ) VALUES ( '" + sData + "', '" + ePriority.ToString("d") + "', '" + DateTime.UtcNow.ToString(Constants.mc_sDateTimeFormat) + "', '" + BusyType.not_busy.ToString("d") + "' );";
 }
开发者ID:hispanico,项目名称:ONLYOFFICE-OnlineEditors,代码行数:5,代码来源:TaskQueue.cs

示例11: FormatMessage

 private string FormatMessage(string message, Category category, Priority priority)
 {
     return string.Format("[{0} {1}] {2}", category.ToString(), priority.ToString(), message);
 }
开发者ID:christal1980,项目名称:wingsoa,代码行数:4,代码来源:DebugLogger.cs

示例12: Do

 /// <summary>
 ///   Does the specified action while logging contextual information.
 /// </summary>
 /// <param name="tag"> The tag. </param>
 /// <param name="priority"> The priority. </param>
 /// <param name="author"> The author. </param>
 /// <param name="description"> The description. </param>
 /// <param name="action"> The action. </param>
 private static void Do(string tag, Priority priority, string author, string description, Action action)
 {
     if (IsLoggingEnabled)
     {
         var stackTrace = new StackTrace();
         var methodName = stackTrace.GetFrame(2).GetMethod().Name;
         var className = stackTrace.GetFrame(2).GetMethod().DeclaringType.FullName;
         var lineNumber = stackTrace.GetFrame(2).GetFileLineNumber();
         var fileName = stackTrace.GetFrame(2).GetFileName();
         var format = "{0} - Priority: {1}, Author: {2}, Description: {3}" + Environment.NewLine
                         + "At {4}.{5}, File: {6}, Line{7}" + Environment.NewLine;
         var message = string.Format(format, tag, priority.ToString(), author, description, className,
                                        methodName, fileName, lineNumber);
         _log.Info(message);
     }
     // Now Run the action.
     action();
 }
开发者ID:feanz,项目名称:Utilities,代码行数:26,代码来源:ToDo.cs

示例13: WithDefaultVerifyDataAfterImport

 public ModifyDataPathBackendSpectraS3Request WithDefaultVerifyDataAfterImport(Priority? defaultVerifyDataAfterImport)
 {
     this._defaultVerifyDataAfterImport = defaultVerifyDataAfterImport;
     if (defaultVerifyDataAfterImport != null)
     {
         this.QueryParams.Add("default_verify_data_after_import", defaultVerifyDataAfterImport.ToString());
     }
     else
     {
         this.QueryParams.Remove("default_verify_data_after_import");
     }
     return this;
 }
开发者ID:shabtaisharon,项目名称:ds3_net_sdk,代码行数:13,代码来源:ModifyDataPathBackendSpectraS3Request.cs

示例14: WithVerifyPriorToAutoEject

 public ModifyStorageDomainSpectraS3Request WithVerifyPriorToAutoEject(Priority? verifyPriorToAutoEject)
 {
     this._verifyPriorToAutoEject = verifyPriorToAutoEject;
     if (verifyPriorToAutoEject != null)
     {
         this.QueryParams.Add("verify_prior_to_auto_eject", verifyPriorToAutoEject.ToString());
     }
     else
     {
         this.QueryParams.Remove("verify_prior_to_auto_eject");
     }
     return this;
 }
开发者ID:rpmoore,项目名称:ds3_net_sdk,代码行数:13,代码来源:ModifyStorageDomainSpectraS3Request.cs

示例15: GetInsertString

        private string GetInsertString(TaskQueueData oTask, Priority ePriority)
        {
            
            string sData = TaskQueueData.SerializeToXml(oTask);

            return string.Format("INSERT INTO {0} " +
                "(cq_data, cq_priority, cq_update_time, cq_create_time, cq_isbusy) " +
                "VALUES ('{1}', '{2}', '{3}', '{3}', '{4}');",
                m_cstrTableName,
                Utils.MySqlEscape(sData, m_sConnectionString),
                ePriority.ToString("d"),
                DateTime.UtcNow.ToString(Constants.mc_sDateTimeFormat),
                BusyType.not_busy.ToString("d"));
        }
开发者ID:jaime-lee,项目名称:DocumentServer,代码行数:14,代码来源:TaskQueueDB.cs


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