private void Add(OclAny item) { int count; map.TryGetValue(item, out count); map[item] = count + 1; }
/// <summary> /// Get CultureInfo specified by OCL locale name /// </summary> /// <param name="name">OCL locale name (example: 'en_US')</param> /// <returns>The requested culture.</returns> public static System.Globalization.CultureInfo GetLocale(OclString name) { if (OclAny.IsNull(name)) { throw new ArgumentNullException(); } return(System.Globalization.CultureInfo.GetCultureInfo(((string)name).Replace('_', '-'))); }
public static T OclUnwrap <T>(this OclObject o) where T : class { if (OclAny.IsNull(o)) { return(null); } return(OclObject.Get <T>(o)); }
public override int GetHashCode() { unchecked { int hash = 21; foreach (KeyValuePair <OclAny, int> pair in map) { OclAny item = pair.Key; hash += pair.Value * (IsNull(item) ? 0 : item.GetHashCode()); } return(hash); } }
public OclCollectionLiteralPartItem(OclAny to) { this.item = to; }
public static TuplePart Part(string name, OclAny value) { return(new TuplePart { name = name, type = null, value = value }); }
public static TuplePart Part(string name, OclClassifier type, OclAny value) { return(new TuplePart { name = name, type = type, value = value }); }
private bool Contains(OclAny item) { return(map.ContainsKey(item)); }
internal static bool IsNull(OclAny o) { return(object.ReferenceEquals(o, null)); }
public OclBoolean op_Equality(OclAny b) { return((OclBoolean)Equals(b)); }