/// <inheritdoc /> public void BeginTenantScope(TenantId tenantId) { if (tenantId.Equals(TenantId.Empty) || tenantId.Equals(TenantId.Default)) { return; } if (!_scopes.TryGetValue(tenantId, out FeatureStateProviderScope scope)) { scope = new FeatureStateProviderScope(_tenantsConfigurationRoot.GetSection($"{tenantId}:Features"), _featureProvider, _rootScope); _scopes.TryAdd(tenantId, scope); } }
/// <summary> /// Equality method between two objects of the same type. /// Because the Equals method is strongly typed by generic constraints, /// it is not necessary to test for the correct object type. /// For safety we just want to match on business key value - in this case the fields /// that cannot be different between the two objects if they are supposedly equal. /// </summary> /// <param name="obj">The other object of this type that we are testing equality with</param> /// <returns></returns> public virtual bool Equals(ApplicationInformation <TIdType> obj) { if (obj != null) { // Transient objects are not considered as equal if (IsTransient() && obj.IsTransient()) { return(false); } else { // For safe equality we need to match on business key equality. // Base domain entities are functionally equal if their key and metadata and tags are equal. // Subclasses should extend to include their own enhanced equality checks, as required. if (TenantId != null) { return(Id.Equals(obj.Id) && Culture.Equals(obj.Culture) && ApplicationKey.Equals(obj.ApplicationKey) && Name.Equals(obj.Name)); } else { return(Id.Equals(obj.Id) && Culture.Equals(obj.Culture) && ApplicationKey.Equals(obj.ApplicationKey) && Name.Equals(obj.Name) && TenantId.Equals(obj.TenantId)); } } } return(false); }
/// <summary> /// Compares this <see cref="SystemAssignedIdentity"/> instance with another object and determines if they are equals. /// </summary> /// <param name="other"> <see cref="SystemAssignedIdentity"/> object to compare. </param> /// <returns> True if they are equal, otherwise false. </returns> public bool Equals(SystemAssignedIdentity other) { if (other == null) { return(false); } return(TenantId.Equals(other.TenantId) && PrincipalId.Equals(other.PrincipalId)); }
public bool Equals(Product other) { if (ReferenceEquals(this, other)) { return(true); } if (ReferenceEquals(null, other)) { return(false); } return(TenantId.Equals(other.TenantId) && ProductId.Equals(other.ProductId)); }
public override bool Equals(object anotherObject) { bool equalObjects = false; if (anotherObject != null && GetType() == anotherObject.GetType()) { TimeConstrainedProcessTracker typedObject = (TimeConstrainedProcessTracker)anotherObject; equalObjects = TenantId.Equals(typedObject.TenantId) && ProcessId.Equals(typedObject.ProcessId); } return(equalObjects); }
public bool Equals(CommittedBacklogItem other) { if (ReferenceEquals(this, other)) { return(true); } if (ReferenceEquals(null, other)) { return(false); } return(TenantId.Equals(other.TenantId) && SprintId.Equals(other.SprintId) && BacklogItemId.Equals(other.BacklogItemId)); }
public bool Equals(ScheduledBacklogItem other) { if (ReferenceEquals(this, other)) { return(true); } if (ReferenceEquals(null, other)) { return(false); } return(TenantId.Equals(other.TenantId) && ReleaseId.Equals(other.ReleaseId) && BacklogItemId.Equals(other.BacklogItemId)); }
/// <summary> /// Equality method between two objects of the same type. /// Because the Equals method is strongly typed by generic constraints, /// it is not necessary to test for the correct object type. /// For safety we just want to match on business key value - in this case the fields /// that cannot be different between the two objects if they are supposedly equal. /// </summary> /// <param name="obj">The other object of this type that we are testing equality with</param> /// <returns></returns> public virtual bool Equals(GetAllInputDtoBase <TIdType> obj) { if (obj != null) { return(Name.Equals(obj.Name) && Culture.Equals(obj.Culture) && TenantId.Equals(obj.TenantId) && DescriptionShort.Equals(obj.DescriptionShort) && DescriptionFull.Equals(obj.DescriptionFull) && IsActive.Equals(obj.IsActive) && CreationTime.Equals(obj.CreationTime) && CreatorUserName.Equals(obj.CreatorUserName) && LastModifierUserName.Equals(obj.LastModifierUserName) && LastModificationTime.Equals(obj.LastModificationTime) ); } return(false); }
/// <summary> /// Returns true if Program instances are equal /// </summary> /// <param name="other">Instance of Program to be compared</param> /// <returns>Boolean</returns> public bool Equals(Program other) { if (other is null) { 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) ) && ( Enabled == other.Enabled || Enabled.Equals(other.Enabled) ) && ( TenantId == other.TenantId || TenantId != null && TenantId.Equals(other.TenantId) ) && ( ImsOrgId == other.ImsOrgId || ImsOrgId != null && ImsOrgId.Equals(other.ImsOrgId) ) && ( Links == other.Links || Links != null && Links.Equals(other.Links) )); }
public virtual bool Equals(S2SAppSettings settings) { if (!ClientId.Equals(settings.ClientId)) { return(false); } if (!ClientSecret.Equals(settings.ClientSecret)) { return(false); } if (!Resource.Equals(settings.Resource)) { return(false); } if (!TenantId.Equals(settings.TenantId)) { return(false); } return(true); }
/// <summary> /// Equality method between two objects of the same type. /// Because the Equals method is strongly typed by generic constraints, /// it is not necessary to test for the correct object type. /// </summary> /// <param name="obj">The other object of this type we are testing equality with</param> /// <returns>True if the objects are equal in value</returns> public virtual bool Equals(MetadataInformation obj) { // If parameter is null, return false. if (obj is null) { return(false); } // Optimization for a common success case. if (ReferenceEquals(this, obj)) { return(true); } // If run-time types are not exactly the same, return false. if (this.GetType() != obj.GetType()) { return(false); } // Return true if the fields match. // Note that the base class is not invoked because it is // System.Object, which defines Equals as reference equality. return ( TenantId.Equals(obj.TenantId) && CreatorUserId.Equals(obj.CreatorUserId) && Name.Equals(obj.Name) && DescriptionFull.Equals(obj.DescriptionFull) && DescriptionShort.Equals(obj.DescriptionShort) && LastModifierUserId.Equals(obj.LastModifierUserId) && CreationTime.Equals(obj.CreationTime) && LastModificationTime.Equals(obj.LastModificationTime) && IsDeleted.Equals(obj.IsDeleted) && IsActive.Equals(obj.IsActive) ) ; }
public bool Equals(BpmnDefinition other) { // Check for null if (ReferenceEquals(other, null)) { return(false); } // Check for same reference if (ReferenceEquals(this, other)) { return(true); } // Not Check DeploymentId, because generated Guid // Check for same value return(((DeploymentId == null && other.DeploymentId == null) || (DeploymentId != null && other.DeploymentId != null && DeploymentId.Equals(other.DeploymentId))) && ((Name == null && other.Name == null) || (Name != null && other.Name != null && Name.Equals(other.Name))) && ((DefinitionKey == null && other.DefinitionKey == null) || (DefinitionKey != null && other.DefinitionKey != null && DefinitionKey.Equals(other.DefinitionKey))) && ((ProcessDefinitionDescription == null && other.ProcessDefinitionDescription == null) || (ProcessDefinitionDescription != null && other.ProcessDefinitionDescription != null && ProcessDefinitionDescription.Equals(other.ProcessDefinitionDescription))) && ((ProcessDefinitionDiagramResourceName == null && other.ProcessDefinitionDiagramResourceName == null) || (ProcessDefinitionDiagramResourceName != null && other.ProcessDefinitionDiagramResourceName != null && ProcessDefinitionDiagramResourceName.Equals(other.ProcessDefinitionDiagramResourceName))) && (ProcessDefinitionHasStartFormKey.Equals(other.ProcessDefinitionHasStartFormKey)) && (ProcessDefinitionHasGraphicalNotation.Equals(other.ProcessDefinitionHasGraphicalNotation)) && (IsSuspended.Equals(other.IsSuspended)) && ((TenantId == null && other.TenantId == null) || (TenantId != null && other.TenantId != null && TenantId.Equals(other.TenantId)))); }