internal static INativeInstance CreateInstance(IPrimaryInfo instance) { if (instance == null) { return(NativeInstance.Zero); } return(PrimaryInfo.CreateNativeInstance(instance)); }
private static INativeInstance CreateNativeInstance(IPrimaryInfo instance) { return(new NativePrimaryInfo { X = instance.X, Y = instance.Y, Z = instance.Z, }); }
/// <summary> /// Determines whether the specified <see cref="IPrimaryInfo"/> is equal to the current <see cref="PrimaryInfo"/>. /// </summary> /// <param name="other">The <see cref="IPrimaryInfo"/> to compare this <see cref="PrimaryInfo"/> with.</param> /// <returns>True when the specified <see cref="IPrimaryInfo"/> is equal to the current <see cref="PrimaryInfo"/>.</returns> public bool Equals(IPrimaryInfo other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (X == other.X && Y == other.Y && Z == other.Z); }