protected override void OnPropertyDeserialized (string name, object value, IReferenceResolver resolver) { if (name == "connectionID") ConnectionId = (int) value; else if (name == "connection") Connection = (IBObject) value; else base.OnPropertyDeserialized (name, value, resolver); }
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); } }
public void Add (IBObject resolveable) { identifiableObjects.Add (resolveable.Id.Value, resolveable); }
static string GetTypeName (Dictionary<int,string> customTypeNames, IBObject obj) { string name = null; // First resolve custom classes. Seems Apple also uses these for some framework classes, // maybe for classes without direct desktop equivalents? if (obj != null && obj.Id.HasValue && customTypeNames != null) customTypeNames.TryGetValue (obj.Id.Value, out name); //else, try to handle the interface builder built-in types if (name == null && obj is UnknownIBObject) { string ibType = ((UnknownIBObject)obj).Class; if (ibType.StartsWith ("NS")) { name = ibType; } else if (ibType.StartsWith ("IB") && ibType.Length > 2 && ibType != "IBUICustomObject") { name = ibType.Substring (2); } } //now try to resolve the obj-c name to a fully qualified class if (name != null) { string resolvedName; if (typeNameMap.TryGetValue (name, out resolvedName)) return resolvedName; } return name; }
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); }