public override bool Equals(object obj) { if (!(obj is DOTweenId other)) { return(false); } return(ObjectUtil.Equals(this.prefix, other.prefix) && ObjectUtil.Equals(this.owner, other.owner)); }
public override bool Equals(object obj) { if (!(obj is KeyValuePairCat <K, V> other)) { return(false); } return(ObjectUtil.Equals(key, other.key) && ObjectUtil.Equals(value, other.value)); }
public override bool Equals(object obj) { Key other = obj as Key; if (other == null) { return(false); } if (ObjectUtil.Equals(other.key, key) && ObjectUtil.Equals(other.subKey, subKey)) { return(true); } return(false); }
public void RemoveListenersByObj(object obj) { foreach (var keyValue in this.listenerDict) { var listenerInfoList = keyValue.Value; for (int i = listenerInfoList.Count - 1; i >= 0; i--) { if (ObjectUtil.Equals(listenerInfoList[i].obj, obj)) { listenerInfoList.RemoveAt(i); } } } }
public void UnRegisterListener(string type, Unit unit, object obj, string tag) { if (!this.listenerDict.ContainsKey(type)) { LogCat.error("Unregister Listener with undefine type()!", type); return; } for (int i = this.listenerDict[type].Count - 1; i >= 0; i--) { var listenerInfo = this.listenerDict[type][i]; if (listenerInfo.unit == unit && listenerInfo.obj == obj && ObjectUtil.Equals(listenerInfo.tag, tag)) { this.listenerDict[type].RemoveAt(i); break; } } }
/** * value type and scene object refs are copied */ private static bool IsAssignable(MemberInfo m, object oldValue, object newValue) { if (ObjectUtil.Equals(oldValue, newValue)) { return(false); } System.Type valType = null; if (m is PropertyInfo) { valType = (m as PropertyInfo).PropertyType; } else { valType = (m as FieldInfo).FieldType; } if (valType.IsValueType || valType == typeof(string)) { return(true); } return(newValue is Object && !string.IsNullOrEmpty(AssetDatabase.GetAssetPath((Object)newValue))); }
private static bool IsAssignableForOnlyNullTarget(MemberInfo m, object oldValue, object newValue) { if (ObjectUtil.Equals(oldValue, newValue)) { return(false); } System.Type valType = null; if (m is PropertyInfo) { valType = (m as PropertyInfo).PropertyType; } else { valType = (m as FieldInfo).FieldType; } if (valType.IsClass && ((Object)oldValue) == null) { return(true); } return(false); }
public static bool operator !=(PageStyleClass left, PageStyleClass right) { return(!ObjectUtil.Equals(left, right)); }