protected override void OnPropertyDeserialized (string name, object value) { if (name == "connectionID") ConnectionId = (int) value; else if (name == "connection") Connection = (IBObject) value; else base.OnPropertyDeserialized (name, value); }
static string GetTypeName (Dictionary<int,string> customTypeNames, IBObject obj) { string name; if (obj != null && customTypeNames != null && obj.Id.HasValue && customTypeNames.TryGetValue (obj.Id.Value, out name)) return name; if (obj is UnknownIBObject) { string ibType = ((UnknownIBObject)obj).Class; if (ibType.StartsWith ("NS")) { return "MonoTouch.Foundation." + ibType; } else if (ibType.StartsWith ("IB") && ibType.Length > 2 && ibType != "IBUICustomObject") { name = ibType.Substring (2); string typeName; if (typeNameMap.TryGetValue (name, out typeName)) return typeName; } } return null; }
public void Add (IBObject resolveable) { identifiableObjects.Add (resolveable.Id.Value, resolveable); }