コード例 #1
0
ファイル: ChangeCase.cs プロジェクト: bangush/server-1
        /// <summary>
        /// Parses the value of <see cref="Mode"/>.
        /// </summary>
        protected bool TryGetChangeCaseMode(out ChangeCaseMode result)
        {
            if (string.IsNullOrEmpty(Mode))
            {
                result = ChangeCaseMode.LowerCase;
                return(true);
            }

            foreach (ChangeCaseMode eValue in Enum.GetValues(typeof(ChangeCaseMode)))
            {
                if (string.Equals(Mode, eValue.ToString(), StringComparison.InvariantCultureIgnoreCase))
                {
                    result = eValue;
                    return(true);
                }
            }

            result = ChangeCaseMode.LowerCase;
            return(false);
        }
コード例 #2
0
ファイル: ChangeCase.cs プロジェクト: m-berkani/ClearCanvas
		/// <summary>
		/// Parses the value of <see cref="Mode"/>.
		/// </summary>
		protected bool TryGetChangeCaseMode(out ChangeCaseMode result)
		{
			if (string.IsNullOrEmpty(Mode))
			{
				result = ChangeCaseMode.LowerCase;
				return true;
			}

			foreach (ChangeCaseMode eValue in Enum.GetValues(typeof (ChangeCaseMode)))
			{
				if (string.Equals(Mode, eValue.ToString(), StringComparison.InvariantCultureIgnoreCase))
				{
					result = eValue;
					return true;
				}
			}

			result = ChangeCaseMode.LowerCase;
			return false;
		}