public bool HasBody() { if (BaseHandle.ReferenceEquals(handle, null)) { return(false); } else { return(handle.HasBody()); } }
public static bool operator false(BaseHandle handle) { if (BaseHandle.ReferenceEquals(handle, null)) { return(true); } else { return(!handle.handle.HasBody()); } }
public static bool operator !(BaseHandle x) { // if the C# object is null, return true if (BaseHandle.ReferenceEquals(x, null)) { return(true); } if (x.HasBody()) { return(false); } return(true); }
public static bool operator ==(BaseHandle x, BaseHandle y) { if (BaseHandle.ReferenceEquals(x, null) && BaseHandle.ReferenceEquals(y, null)) { return(true); } else if (BaseHandle.ReferenceEquals(x, null) || BaseHandle.ReferenceEquals(y, null)) { return(false); } else { return(x.handle == y.handle); } }
public static BaseHandle operator |(BaseHandle x, BaseHandle y) { if (!BaseHandle.ReferenceEquals(x, null) || !BaseHandle.ReferenceEquals(y, null)) { if (x.HasBody()) { return(x); } if (y.HasBody()) { return(y); } return(null); } return(null); }