public virtual void SetObject(Zetbox.API.IDataObject newObj) { // base.SetObject(); if (OnSetObject_AnyReference != null) { OnSetObject_AnyReference(this, newObj); } else { throw new NotImplementedException("No handler registered on method AnyReference.SetObject"); } }
public override bool IsValid(Zetbox.API.IDataObject constrainedObject) { var e = new MethodReturnEventArgs <bool>(); if (OnIsValid_IndexConstraint != null) { OnIsValid_IndexConstraint(this, e, constrainedObject); } else { e.Result = base.IsValid(constrainedObject); } return(e.Result); }
public override string GetErrorText(Zetbox.API.IDataObject constrainedObject) { var e = new MethodReturnEventArgs <string>(); if (OnGetErrorText_IndexConstraint != null) { OnGetErrorText_IndexConstraint(this, e, constrainedObject); } else { e.Result = base.GetErrorText(constrainedObject); } return(e.Result); }
public virtual bool IsValid(Zetbox.API.IDataObject constrainedObject) { var e = new MethodReturnEventArgs <bool>(); if (OnIsValid_InstanceConstraint != null) { OnIsValid_InstanceConstraint(this, e, constrainedObject); } else { throw new NotImplementedException("No handler registered on InstanceConstraint.IsValid"); } return(e.Result); }
public virtual string GetErrorText(Zetbox.API.IDataObject constrainedObject) { var e = new MethodReturnEventArgs <string>(); if (OnGetErrorText_InstanceConstraint != null) { OnGetErrorText_InstanceConstraint(this, e, constrainedObject); } else { throw new NotImplementedException("No handler registered on InstanceConstraint.GetErrorText"); } return(e.Result); }
public static void SetObject(AnyReference obj, Zetbox.API.IDataObject newObj) { if (newObj == null) { obj.ObjClass = null; obj.ObjGuid = null; obj.ObjID = null; } else { var cls = newObj.GetObjectClass(_frozenCtx); obj.ObjClass = cls.ExportGuid; if (cls.ImplementsIExportable()) { obj.ObjGuid = ((IExportable)newObj).ExportGuid; obj.ObjID = null; } else { obj.ObjGuid = null; obj.ObjID = newObj.ID; } } }