public override bool Equals(object obj)
 {
     if (obj is AssemblyReferencesWrapper)
     {
         AssemblyReferencesWrapper other = obj as AssemblyReferencesWrapper;
         return(modef.Equals(other.modef));
     }
     return(base.Equals(obj));
 }
 public override bool Equals(object obj)
 {
     if (obj is NamespaceWrapper)
     {
         NamespaceWrapper other = obj as NamespaceWrapper;
         return((modef.Equals(other.modef)) && (@namespace == other.@namespace));
     }
     return(base.Equals(obj));
 }
Exemple #3
0
        /// <inheritdoc/>
        public async Task <bool?> TryEvaluateModuleAsync(IEvaluationScheduler scheduler, ModuleDefinition iModule, QualifierId qualifierId)
        {
            if (!iModule.Equals(ModuleDef))
            {
                return(null);
            }

            return(await Task.FromResult(TryEvaluate(ModuleDef, qualifierId)));
        }
Exemple #4
0
 /// <summary>
 /// Determines whether the specified Object is equal to the current Object
 /// </summary>
 /// <param name="obj">Object to compare</param>
 /// <returns>True if the same namespace and module definition</returns>
 public override bool Equals(object obj)
 {
     if (obj is NamespaceWrapper)
     {
         var other = obj as NamespaceWrapper;
         return((_modef.Equals(other._modef)) && (_namespace == other._namespace));
     }
     // ReSharper disable once BaseObjectEqualsIsObjectEquals
     return(base.Equals(obj));
 }
Exemple #5
0
        /// <inheritdoc/>
        public async Task <bool?> TryEvaluateModuleAsync(IEvaluationScheduler scheduler, ModuleDefinition iModule, QualifierId qualifierId)
        {
            if (!iModule.Equals(ModuleDefinition))
            {
                return(null);
            }

            var module = (ModuleDefinition)iModule;

            return(await EvaluateAllFilesAsync(module.Specs, qualifierId));
        }
Exemple #6
0
        /// <inheritdoc/>
        public async Task <bool?> TryEvaluateModuleAsync(IEvaluationScheduler scheduler, ModuleDefinition iModule, QualifierId qualifierId)
        {
            if (!iModule.Equals(ModuleDef))
            {
                return(null);
            }

            // Note: we are effectively evaluating iModule
            // Using await to suppress compiler warnings
            // TODO: Async?
            return(await Task.FromResult(TryEvaluate(ModuleDef, qualifierId)));
        }
        public override bool Equals(object obj)
        {
            var wrapper = obj as NamespaceWrapper;

            if (wrapper != null)
            {
                return(_modef.Equals(wrapper._modef) && (_namespace == wrapper._namespace));
            }

            // ReSharper disable once BaseObjectEqualsIsObjectEquals
            return(base.Equals(obj));
        }