Пример #1
0
        public override bool Equals(Base other)
        {
            if (other == null)
            {
                return(false);
            }
            if (other is ModuleOperation ModuleOperation)
            {
                return(OperationId.Equals(ModuleOperation.OperationId) && ModuleId.Equals(ModuleOperation.ModuleId));
            }

            return(false);
        }
Пример #2
0
        public override bool Equals(Base other)
        {
            if (other == null)
            {
                return(false);
            }
            if (other is ModuleRole ModuleRole)
            {
                return(ModuleId.Equals(ModuleRole.ModuleId) && RoleId.Equals(ModuleRole.RoleId));
            }

            return(false);
        }
Пример #3
0
        /// <summary>
        /// Initialises a new instance of <see cref="FeatureId"/>.
        /// </summary>
        /// <param name="sourceModuleId">The source module id.</param>
        /// <param name="value">The feature id value.</param>
        public FeatureId(ModuleId sourceModuleId, string value)
        {
            if (sourceModuleId.Equals(ModuleId.Empty))
            {
                throw new ArgumentException("The source module id must be provided and cannot be ModuleId.Empty",
                                            nameof(sourceModuleId));
            }

            HasValue              = true;
            ParentModuleId        = sourceModuleId;
            SourceModuleId        = sourceModuleId;
            _parentFeatureIdThunk = null;

            LocalValue = Ensure.IsNotNullOrEmpty(value, nameof(value));
            Value      = ResolveValue(ParentModuleId, Empty, value);
        }
Пример #4
0
        public bool Equals(RoleModulePermissionModel rmpm)
        {
            //Check whether the compared object is null.
            if (Object.ReferenceEquals(rmpm, null))
            {
                return(false);
            }

            //Check whether the compared object references the same data.
            if (Object.ReferenceEquals(this, rmpm))
            {
                return(true);
            }

            //Check whether the objects properties are equal.
            return(RoleId.Equals(rmpm.RoleId) && ModuleId.Equals(rmpm.ModuleId) && PermissionId.Equals(rmpm.PermissionId));
        }
Пример #5
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            var t = obj as LanguageTranslationIdentifier;

            if (t == null)
            {
                return(false);
            }
            if (ModuleId.Equals(t.ModuleId) && ModuleActivityId.Equals(t.ModuleActivityId) && Language.Equals(t.Language) && ObjectName.Equals(t.ObjectName))
            {
                return(true);
            }

            return(false);
        }