Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (InstallDirectory != null ? InstallDirectory.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ApplicationConfigDirectory != null ? ApplicationConfigDirectory.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ModConfigDirectory != null ? ModConfigDirectory.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PluginConfigDirectory != null ? PluginConfigDirectory.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (EnabledPlugins != null ? EnabledPlugins.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ModSupportMatrix != null ? ModSupportMatrix.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = (LoaderPath32 != null ? LoaderPath32.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (LoaderPath64 != null ? LoaderPath64.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ApplicationConfigDirectory != null ? ApplicationConfigDirectory.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ModConfigDirectory != null ? ModConfigDirectory.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (PluginConfigDirectory != null ? PluginConfigDirectory.GetHashCode() : 0);

                if (EnabledPlugins != null)
                {
                    foreach (var plugin in EnabledPlugins)
                    {
                        hashCode = (hashCode * 397) ^ plugin.GetHashCode();
                    }
                }

                return(hashCode);
            }
        }