コード例 #1
0
 /// <summary>
 /// Fires violation.
 /// </summary>
 private void AddViolation(
     CsElement element,
     int?lineNumber,
     CurrentNamingSettings settings,
     string settingName,
     string currentName)
 {
     AddViolation(
         element,
         lineNumber,
         settings.GetFriendlyName(settingName),
         currentName,
         settings.GetExample(settingName));
 }
コード例 #2
0
        /// <summary>
        /// Checks whether name follows length agreement.
        /// </summary>
        private void CheckNameLength(
            CsElement element,
            int?lineNumber,
            CurrentNamingSettings settings,
            string settingName,
            string nameToCheck)
        {
            if (settings.CheckNameLength(settingName, nameToCheck))
            {
                return;
            }

            string friendlyName = settings.GetFriendlyName(settingName);
            string example      = EntitySettingResources.CheckLengthExample;

            AddViolation(
                element,
                lineNumber,
                friendlyName,
                nameToCheck,
                example);
        }
コード例 #3
0
		/// <summary>
		/// Fires violation.
		/// </summary>
		private void AddViolation(
			CsElement element,
			int? lineNumber,
			CurrentNamingSettings settings,
			string settingName,
			string currentName)
		{
			AddViolation(
				element,
				lineNumber,
				settings.GetFriendlyName(settingName),
				currentName,
				settings.GetExample(settingName));
		}
コード例 #4
0
		/// <summary>
		/// Checks whether name follows length agreement.
		/// </summary>
		private void CheckNameLength(
			CsElement element,
			int? lineNumber,
			CurrentNamingSettings settings,
			string settingName,
			string nameToCheck)
		{
			if (settings.CheckNameLength(settingName, nameToCheck))
				return;

			string friendlyName = settings.GetFriendlyName(settingName);
			string example = EntitySettingResources.CheckLengthExample;

			AddViolation(
				element,
				lineNumber,
				friendlyName,
				nameToCheck,
				example);
		}