public bool Equals(OclProgramSource other) { return(ContextId.Equals(other.ContextId) && DeviceId.Equals(other.DeviceId) && Source == other.Source && Options == other.Options); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is TerminalRefund other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((RefundId == null && other.RefundId == null) || (RefundId?.Equals(other.RefundId) == true)) && ((PaymentId == null && other.PaymentId == null) || (PaymentId?.Equals(other.PaymentId) == true)) && ((OrderId == null && other.OrderId == null) || (OrderId?.Equals(other.OrderId) == true)) && ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) && ((Reason == null && other.Reason == null) || (Reason?.Equals(other.Reason) == true)) && ((DeviceId == null && other.DeviceId == null) || (DeviceId?.Equals(other.DeviceId) == true)) && ((DeadlineDuration == null && other.DeadlineDuration == null) || (DeadlineDuration?.Equals(other.DeadlineDuration) == true)) && ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) && ((CancelReason == null && other.CancelReason == null) || (CancelReason?.Equals(other.CancelReason) == true)) && ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) && ((UpdatedAt == null && other.UpdatedAt == null) || (UpdatedAt?.Equals(other.UpdatedAt) == true))); }
/// <summary> /// Returns true if DeviceData instances are equal /// </summary> /// <param name="other">Instance of DeviceData to be compared</param> /// <returns>Boolean</returns> public bool Equals(DeviceData other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( DeviceId == other.DeviceId || DeviceId != null && DeviceId.Equals(other.DeviceId) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) ) && ( Value == other.Value || Value != null && Value.Equals(other.Value) )); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is DeviceCode other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((Code == null && other.Code == null) || (Code?.Equals(other.Code) == true)) && ((DeviceId == null && other.DeviceId == null) || (DeviceId?.Equals(other.DeviceId) == true)) && ((ProductType == null && other.ProductType == null) || (ProductType?.Equals(other.ProductType) == true)) && ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) && ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) && ((PairBy == null && other.PairBy == null) || (PairBy?.Equals(other.PairBy) == true)) && ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) && ((StatusChangedAt == null && other.StatusChangedAt == null) || (StatusChangedAt?.Equals(other.StatusChangedAt) == true)) && ((PairedAt == null && other.PairedAt == null) || (PairedAt?.Equals(other.PairedAt) == true))); }
public override bool Equals(object other) { if (other == null || other.GetType() != typeof(Nuimo)) { return(false); } var otherOptions = (Nuimo)other; return(DeviceId.Equals(otherOptions.DeviceId) && Name.Equals(otherOptions.Name)); }
public VideoCapturerCreationParameters CreationParameters(WebRtcFactory factory) { var param = new VideoCapturerCreationParameters(); param.Name = DeviceName; param.Id = DeviceId; if (DeviceId.Equals("screen-share")) { param.Factory = factory; } param.Format = CreateVideoFormat(); return(param); }
/// <summary> /// 切换监控数据表格 /// </summary> /// <param name="formid"></param> /// <returns></returns> public bool shiftDataForm(int formid) { if (dataFormLst[formid] != null && dataFormLst[formid].Rows.Count > 0) { startRepack(); dataForm = dataFormLst[formid]; int dAreaCount = 0; foreach (DataRow r in dataFormLst[formid].Rows) { if (r["addr"].ToString().Contains(Constant.strDMArea[0])) { dAreaCount++; } } if (dAreaCount > Constant.DataRowWatchMax && !DeviceId.Equals(Constant.simiDeivceName)) { DataTable dt = dataFormLst[formid].Copy(); for (int i = dt.Rows.Count - 1; i >= 0; i--) { dt.Rows.RemoveAt(i); if (dt.Rows.Count == Constant.DataRowWatchMax) { break; } } splitDataForm(dt, dataFormLst[formid]); } else if (dataForm != null && dataForm.Rows.Count > 0) { PackCmdReadDMDataOut(dataForm); } doneRepack(); return(true); } else { return(false); } }
public bool Equals(DeviceBlueprint other) { if (other == null) { return(false); } if (Object.ReferenceEquals(this, other)) { return(true); } return(DeviceId.Equals(other.DeviceId) && DeviceSecret.Equals(other.DeviceSecret) && Template.Equals(other.Template)); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is DeviceCheckoutOptions other && ((DeviceId == null && other.DeviceId == null) || (DeviceId?.Equals(other.DeviceId) == true)) && ((SkipReceiptScreen == null && other.SkipReceiptScreen == null) || (SkipReceiptScreen?.Equals(other.SkipReceiptScreen) == true)) && ((TipSettings == null && other.TipSettings == null) || (TipSettings?.Equals(other.TipSettings) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is TerminalRefundQueryFilter other && ((DeviceId == null && other.DeviceId == null) || (DeviceId?.Equals(other.DeviceId) == true)) && ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) && ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is DeviceDetails other && ((DeviceId == null && other.DeviceId == null) || (DeviceId?.Equals(other.DeviceId) == true)) && ((DeviceInstallationId == null && other.DeviceInstallationId == null) || (DeviceInstallationId?.Equals(other.DeviceInstallationId) == true)) && ((DeviceName == null && other.DeviceName == null) || (DeviceName?.Equals(other.DeviceName) == true))); }
/// <summary> /// Publishes the device registration. /// </summary> /// <param name="registrationData">The registration data.</param> private void Publish_DeviceRegistration(DeviceRegistrationEventData registrationData) { Trace.TraceInformation("{0}.Process_DeviceRegistration: OpCode={1} Match={2} Court={3} RegSeq={4} MinPressure={5} Touch={6} Id={7}", CLASSNAME, registrationData.OpCode, registrationData.GameNumber, registrationData.CourtNumber, registrationData.RegistrationSequence, registrationData.MinimumPressure, registrationData.TouchSensorMode, registrationData.Id); // Record registration sequence information for later verification lock (_deviceRegistrations) { if (_deviceRegistrations.ContainsKey(registrationData.Id)) _deviceRegistrations[registrationData.Id] = registrationData; else _deviceRegistrations.Add(registrationData.Id, registrationData); } // Publish device registration event ThreadPool.QueueUserWorkItem(delegate { OnDeviceRegistered(registrationData); }); #if EIDSS2 // Keep track of Chung and Hong device Id as V1 (EIDSS 2.0) receiver does not provide them // on data events unlike EIDSS 3.0 which does. switch (registrationData.OpCode) { case OpCodes.ChungRegistered: case OpCodes.ChungPreRegistered: if (_HongDeviceId.Equals(registrationData.Id)) _HongDeviceId = new DeviceId(); _ChungDeviceId = registrationData.Id; break; case OpCodes.HongRegistered: case OpCodes.HongPreRegistered: if (_ChungDeviceId.Equals(registrationData.Id)) _ChungDeviceId = new DeviceId(); _HongDeviceId = registrationData.Id; break; } #endif }
virtual protected void Start() { DeviceName = SystemInfo.deviceName.ToString(); DeviceType = SystemInfo.deviceType.ToString(); if (Application.platform == RuntimePlatform.PS4 || Application.platform == RuntimePlatform.XboxOne) { #if GS_DONT_USE_PLAYER_PREFS DeviceId = SystemInfo.deviceUniqueIdentifier.ToString(); #else DeviceId = PlayerPrefs.GetString(PLAYER_PREF_DEVICEID_KEY); if (DeviceId.Equals("")) { DeviceId = System.Guid.NewGuid().ToString(); PlayerPrefs.SetString(PLAYER_PREF_DEVICEID_KEY, DeviceId); PlayerPrefs.Save(); } #endif } else { DeviceId = SystemInfo.deviceUniqueIdentifier.ToString(); } #if !GS_DONT_USE_PLAYER_PREFS AuthToken = PlayerPrefs.GetString(PLAYER_PREF_AUTHTOKEN_KEY); UserId = PlayerPrefs.GetString(PLAYER_PREF_USERID_KEY); #endif Platform = Application.platform.ToString(); ExtraDebug = GameSparksSettings.DebugBuild; #if !UNITY_WEBPLAYER PersistentDataPath = Application.persistentDataPath; #endif RequestTimeoutSeconds = 10; GS.Initialise(this); DontDestroyOnLoad(this); }
/// <summary> /// Returns true if LightingZone instances are equal /// </summary> /// <param name="other">Instance of LightingZone to be compared</param> /// <returns>Boolean</returns> public bool Equals(LightingZone other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( DeviceId == other.DeviceId || DeviceId != null && DeviceId.Equals(other.DeviceId) ) && ( DeviceType == other.DeviceType || DeviceType != null && DeviceType.Equals(other.DeviceType) ) && ( Zone == other.Zone || Zone != null && Zone.Equals(other.Zone) )); }
virtual protected void Start() { DeviceName = SystemInfo.deviceName.ToString(); DeviceType = SystemInfo.deviceType.ToString(); #if UNITY_ANDROID && !UNITY_EDITOR && UNITY_5_3 if (true) #elif UNITY_5_4_OR_NEWER if (Application.platform == RuntimePlatform.PS4 || Application.platform == RuntimePlatform.XboxOne || SystemInfo.unsupportedIdentifier == SystemInfo.deviceUniqueIdentifier) #else if (Application.platform == RuntimePlatform.PS4 || Application.platform == RuntimePlatform.XboxOne) #endif { #if GS_DONT_USE_PLAYER_PREFS || UNITY_SWITCH #if UNITY_5_4_OR_NEWER if (SystemInfo.unsupportedIdentifier == SystemInfo.deviceUniqueIdentifier) { DeviceId = System.Guid.NewGuid().ToString(); } else { DeviceId = SystemInfo.deviceUniqueIdentifier.ToString(); } #else DeviceId = System.Guid.NewGuid().ToString(); #endif #else DeviceId = PlayerPrefs.GetString(PLAYER_PREF_DEVICEID_KEY); if (DeviceId.Equals("")) { DeviceId = System.Guid.NewGuid().ToString(); PlayerPrefs.SetString(PLAYER_PREF_DEVICEID_KEY, DeviceId); PlayerPrefs.Save(); } #endif } else { DeviceId = SystemInfo.deviceUniqueIdentifier.ToString(); } char[] delimiterChars = { ' ', ',', '.', ':', '-', '_', '(', ')' }; int cpuCores = SystemInfo.processorCount; string manufacturer = "Unknown"; string model = SystemInfo.deviceModel; string memory = SystemInfo.systemMemorySize + " MB"; string osName = SystemInfo.operatingSystem; string osVersion = SystemInfo.operatingSystem; string cpuVendor = SystemInfo.processorType; string resolution = Screen.width + "x" + Screen.height; string gssdk = GameSparks.Core.GS.Version; string engine = SDK; string engineVersion = Application.unityVersion; string[] listStrings; switch (DeviceOS) { case "MACOS": case "IOS": case "TVOS": manufacturer = "Apple"; listStrings = SystemInfo.operatingSystem.Split(delimiterChars); if (DeviceOS.Equals("MACOS")) { osName = listStrings [0] + " " + listStrings [1] + " " + listStrings[2]; osVersion = listStrings [3] + "." + listStrings [4] + "." + listStrings[5]; } else { //if (listStrings[0].Equals("iOS")) { osName = listStrings [0]; osVersion = listStrings [1] + "." + listStrings [2]; //} else { // osName = listStrings [0] + " " + listStrings [1]; // osVersion = listStrings [2] + "." + listStrings [3]; //} } break; case "WINDOWS": case "WSA": case "XBOXONE": manufacturer = "Microsoft"; if (DeviceOS.Equals("XBOXONE")) { model = "Xbox One"; memory = (SystemInfo.systemMemorySize / 1000) + " MB"; osVersion = "Unknown"; } else { model = "PC"; listStrings = SystemInfo.operatingSystem.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); osName = listStrings [0] + " " + listStrings [1]; osVersion = listStrings [2] + "." + listStrings [3] + "." + listStrings[4]; } cpuVendor += " " + SystemInfo.processorFrequency.ToString() + "MHz"; RegexOptions options = RegexOptions.None; Regex regex = new Regex("[ ]{2,}", options); cpuVendor = regex.Replace(cpuVendor, " "); break; case "ANDROID": listStrings = SystemInfo.deviceModel.Split(delimiterChars); manufacturer = listStrings [0]; model = SystemInfo.deviceModel.Replace(manufacturer, "").Substring(1); listStrings = SystemInfo.operatingSystem.Split(delimiterChars); osName = listStrings [0] + " " + listStrings [1]; osVersion = listStrings [7]; cpuVendor += " " + SystemInfo.processorFrequency + "MHz"; break; #if !UNITY_2017_3_OR_NEWER case "SAMSUNGTV": manufacturer = "Samsung"; break; #endif case "WIIU": manufacturer = "Nintendo"; model = "WiiU"; break; case "SWITCH": manufacturer = "Nintendo"; model = "Switch"; osVersion = "Unknown"; break; case "PS4": manufacturer = "Sony"; model = "PS4"; memory = (SystemInfo.systemMemorySize / 1000000) + " MB"; listStrings = SystemInfo.operatingSystem.Split(delimiterChars); osName = listStrings [0]; osVersion = listStrings [1] + "." + listStrings [2] + "." + listStrings[3]; cpuVendor += " " + SystemInfo.processorFrequency + "MHz"; break; case "TIZEN": manufacturer = "Tizen"; break; case "WEBGL": listStrings = SystemInfo.deviceModel.Split(delimiterChars); model = listStrings [0]; listStrings = SystemInfo.operatingSystem.Split(delimiterChars); osName = listStrings [0]; if (osName.Equals("Mac")) { osName += " " + listStrings [1] + " " + listStrings [2]; osVersion = listStrings [3] + "." + listStrings [4] + "." + listStrings [5]; } else { osVersion = listStrings [1]; } break; } Dictionary <string, object> data = new Dictionary <string, object> (); data.Add("manufacturer", manufacturer); data.Add("model", model); data.Add("memory", memory); data.Add("os.name", osName); data.Add("os.version", osVersion); data.Add("cpu.cores", cpuCores.ToString()); data.Add("cpu.vendor", cpuVendor); data.Add("resolution", resolution); data.Add("gssdk", gssdk); data.Add("engine", engine); data.Add("engine.version", engineVersion); DeviceStats = new GSData(data); /*Debug.Log (DeviceStats.GetString ("manufacturer")); * Debug.Log (DeviceStats.GetString ("model")); * Debug.Log (DeviceStats.GetString ("memory")); * Debug.Log (DeviceStats.GetString ("os.name")); * Debug.Log (DeviceStats.GetString ("os.version")); * Debug.Log (DeviceStats.GetString ("cpu.cores")); * Debug.Log (DeviceStats.GetString ("cpu.vendor")); * Debug.Log (DeviceStats.GetString ("resolution")); * Debug.Log (DeviceStats.GetString ("gssdk")); * Debug.Log (DeviceStats.GetString ("engine")); * Debug.Log (DeviceStats.GetString ("engine.version"));*/ #if !GS_DONT_USE_PLAYER_PREFS && !UNITY_SWITCH AuthToken = PlayerPrefs.GetString(PLAYER_PREF_AUTHTOKEN_KEY); UserId = PlayerPrefs.GetString(PLAYER_PREF_USERID_KEY); #endif Platform = Application.platform.ToString(); var gameSparksUnity = GetComponent <GameSparksUnity>(); GameSparksSettings.SetInstance(gameSparksUnity.settings); ExtraDebug = GameSparksSettings.DebugBuild; #if !UNITY_WEBPLAYER && !UNITY_SWITCH PersistentDataPath = Application.persistentDataPath; #endif GS.Initialise(this); DontDestroyOnLoad(this); #if UNITY_EDITOR #if UNITY_2017_2_OR_NEWER EditorApplication.playModeStateChanged += HandlePlayModeStateChanged; #else EditorApplication.playmodeStateChanged += HandlePlayModeStateChanged; #endif #endif }
public override Dictionary <string, object> ToUpdate(IMemoryCache memoryCache, out BaseModel updatedElement) { Dictionary <string, object> changes = new Dictionary <string, object>(); Sensor refInCache = null; if (Id != Guid.Empty) { refInCache = CacheHelper.GetSensorFromCache(memoryCache, Id); if (refInCache != null) { if (!DeviceId.Equals(refInCache.DeviceId)) { changes.Add("DeviceId", DeviceId); refInCache.DeviceId = DeviceId; } if (HardwareId != null && !HardwareId.Equals(refInCache.HardwareId)) { changes.Add("HardwareId", HardwareId); refInCache.HardwareId = HardwareId; } if (SpaceId != null && !SpaceId.Equals(refInCache.SpaceId)) { changes.Add("SpaceId", SpaceId); refInCache.SpaceId = SpaceId; } if (!PollRate.Equals(refInCache.PollRate)) { changes.Add("PollRate", PollRate); refInCache.PollRate = PollRate; } if (PortType != null && !PortType.Equals(refInCache.PortType)) { changes.Add("PortType", PortType); refInCache.PortType = PortType; } if (DataType != null && !DataType.Equals(refInCache.DataType)) { changes.Add("DataType", DataType); refInCache.DataType = DataType; } if (DataUnitType != null && !DataUnitType.Equals(refInCache.DataUnitType)) { changes.Add("DataUnitType", DataUnitType); refInCache.DataUnitType = DataUnitType; } if (DataSubtype != null && !DataSubtype.Equals(refInCache.DataSubtype)) { changes.Add("DataSubtype", DataSubtype); refInCache.DataSubtype = DataSubtype; } } else { refInCache = this; if (DeviceId != null) { changes.Add("DeviceId", DeviceId); } if (HardwareId != null) { changes.Add("HardwareId", HardwareId); } if (SpaceId != null) { changes.Add("SpaceId", SpaceId); } if (PollRate != 0) { changes.Add("PollRate", PollRate); } if (PortType != null) { changes.Add("PortType", PortType); } if (DataType != null) { changes.Add("DataType", DataType); } if (DataUnitType != null) { changes.Add("DataUnitType", DataUnitType); } if (DataSubtype != null) { changes.Add("DataSubTypeId", DataSubTypeId); } } } updatedElement = refInCache; return(changes); }
protected bool Equals(AccountDevice other) { return(DeviceId.Equals(other.DeviceId) && string.Equals(SecretToken, other.SecretToken)); }
public int GenerateId() => (!DeviceId.Equals(Utils.Common)) ? DeviceId.GetHashCode() : IpAddress.GetHashCode();