public override int GetHashCode() { int hash = 1; if (defaultRateSchedule_ != null) { hash ^= DefaultRateSchedule.GetHashCode(); } if (ShowCancellationPolicy != false) { hash ^= ShowCancellationPolicy.GetHashCode(); } if (RequirePhoneNumber != false) { hash ^= RequirePhoneNumber.GetHashCode(); } if (CharacterCase != 0) { hash ^= CharacterCase.GetHashCode(); } if (BlockDropDays != 0) { hash ^= BlockDropDays.GetHashCode(); } if (ViewFolioHighlightDays != 0) { hash ^= ViewFolioHighlightDays.GetHashCode(); } return(hash); }
private static char GetCasedChar(char c, CharacterCase cc) { switch (cc) { case CharacterCase.Lower: return(Char.ToLower(c)); case CharacterCase.Upper: return(Char.ToUpper(c)); } return(c); }
/// <summary> /// Construtor padrão. /// </summary> /// <param name="owner">Dono da propriedade.</param> /// <param name="propertyName">Nome da propriedade</param> public BusinessEntityPropertyState(IStateble owner, string propertyName) { owner.Require("owner").NotNull(); propertyName.Require("propertyName").NotNull().NotEmpty(); _charCase = CharacterCase.Undefined; _owner = owner; _propertyName = propertyName; _owner.PropertyChanged += OwnerPropertyChanged; _otherAttributes = new Dictionary <string, object>(); _isConfigured = false; }
/// <summary> /// Changes case for a string content of a button, if it's not null. /// </summary> private static void ExclusiveCaseChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { Button button = (Button)d; string content = button.Content.ToString(); if (content != null) { CharacterCase newCase = (CharacterCase)e.NewValue; button.Content = newCase == CharacterCase.OnlyUpper ? content.ToUpper() : content.ToLower(); } }
private static string GetCasedString(string s, CharacterCase cc) { if (s == null) { return(null); } StringBuilder sb = new StringBuilder(); foreach (char c in s) { sb.Append(GetCasedChar(c, cc)); } return(sb.ToString()); }
public static char GetCasedChar(char c, CharacterCase cc) { switch (cc) { case CharacterCase.Lower: return Char.ToLower(c); case CharacterCase.Upper: return Char.ToUpper(c); } return c; }
public static string GetCasedString(string s, CharacterCase cc) { if (s == null) return null; var sb = new StringBuilder(); foreach (char c in s) sb.Append(GetCasedChar(c, cc)); return sb.ToString(); }
/// <summary> /// Sets CharacterCase value of ExclusiveCase property for the specified button. /// </summary> /// <param name="button">Button whose ExclusiveCase you're setting.</param> /// <param name="value">Character case you wish to set for the ExclusiveCase property.</param> public static void SetExclusiveCase(Button button, CharacterCase value) { button.SetValue(ExclusiveCaseProperty, value); }