public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CardPaymentDetails other && ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) && ((Card == null && other.Card == null) || (Card?.Equals(other.Card) == true)) && ((EntryMethod == null && other.EntryMethod == null) || (EntryMethod?.Equals(other.EntryMethod) == true)) && ((CvvStatus == null && other.CvvStatus == null) || (CvvStatus?.Equals(other.CvvStatus) == true)) && ((AvsStatus == null && other.AvsStatus == null) || (AvsStatus?.Equals(other.AvsStatus) == true)) && ((AuthResultCode == null && other.AuthResultCode == null) || (AuthResultCode?.Equals(other.AuthResultCode) == true)) && ((ApplicationIdentifier == null && other.ApplicationIdentifier == null) || (ApplicationIdentifier?.Equals(other.ApplicationIdentifier) == true)) && ((ApplicationName == null && other.ApplicationName == null) || (ApplicationName?.Equals(other.ApplicationName) == true)) && ((ApplicationCryptogram == null && other.ApplicationCryptogram == null) || (ApplicationCryptogram?.Equals(other.ApplicationCryptogram) == true)) && ((VerificationMethod == null && other.VerificationMethod == null) || (VerificationMethod?.Equals(other.VerificationMethod) == true)) && ((VerificationResults == null && other.VerificationResults == null) || (VerificationResults?.Equals(other.VerificationResults) == true)) && ((StatementDescription == null && other.StatementDescription == null) || (StatementDescription?.Equals(other.StatementDescription) == true)) && ((DeviceDetails == null && other.DeviceDetails == null) || (DeviceDetails?.Equals(other.DeviceDetails) == true)) && ((CardPaymentTimeline == null && other.CardPaymentTimeline == null) || (CardPaymentTimeline?.Equals(other.CardPaymentTimeline) == true)) && ((RefundRequiresCardPresence == null && other.RefundRequiresCardPresence == null) || (RefundRequiresCardPresence?.Equals(other.RefundRequiresCardPresence) == true)) && ((Errors == null && other.Errors == null) || (Errors?.Equals(other.Errors) == true))); }
public virtual ApiKeyInfo AddApiKey() { if (ApplicationName.Equals(ApplicationDiagnosticInfo.UnknownApplication)) { throw new ApplicationNameNotSpecifiedException(); } CoreServices.ApplicationRegistration.Data.Application app = CompositeRepository.Query <CoreServices.ApplicationRegistration.Data.Application>(a => a.Name.Equals(base.ApplicationName)).FirstOrDefault(); if (app == null) { throw new InvalidOperationException("Application not registered"); } AddApiKey(ApplicationRegistrationRepository, app, out CoreServices.ApplicationRegistration.Data.ApiKey key); return(new ApiKeyInfo { ApplicationClientId = key.ClientId, ApiKey = key.SharedSecret, ApplicationName = ApplicationName }); }
private void SetAppNameProvider(UserManager mgr, ILogger logger) { if (string.IsNullOrEmpty(ApplicationName) || ApplicationName.Equals(DefaultConfiguration.DefaultApplicationName)) { Type appNameResolverType = Type.GetType(ApplicationNameResolverType); Type defaultAppNameProvider = typeof(DefaultConfigurationApplicationNameProvider); if (appNameResolverType == null) { appNameResolverType = defaultAppNameProvider; if (!SuppressMessages) { logger.AddEntry("Specified ApplicationNameResolverType\r\n\r\n\t{0}\r\n\r\nwas not found, will use {1} instead", LogEventType.Warning, ApplicationNameResolverType, defaultAppNameProvider.FullName); } } mgr.ApplicationNameProvider = appNameResolverType.Construct <IApplicationNameProvider>(); } else { mgr.ApplicationNameProvider = new StaticApplicationNameProvider(ApplicationName); } }