/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (UsersPath != null) { hashCode = hashCode * 59 + UsersPath.GetHashCode(); } if (GroupsPath != null) { hashCode = hashCode * 59 + GroupsPath.GetHashCode(); } if (SystemRelativePath != null) { hashCode = hashCode * 59 + SystemRelativePath.GetHashCode(); } if (DefaultDepth != null) { hashCode = hashCode * 59 + DefaultDepth.GetHashCode(); } if (ImportBehavior != null) { hashCode = hashCode * 59 + ImportBehavior.GetHashCode(); } if (PasswordHashAlgorithm != null) { hashCode = hashCode * 59 + PasswordHashAlgorithm.GetHashCode(); } if (PasswordHashIterations != null) { hashCode = hashCode * 59 + PasswordHashIterations.GetHashCode(); } if (PasswordSaltSize != null) { hashCode = hashCode * 59 + PasswordSaltSize.GetHashCode(); } if (OmitAdminPw != null) { hashCode = hashCode * 59 + OmitAdminPw.GetHashCode(); } if (SupportAutoSave != null) { hashCode = hashCode * 59 + SupportAutoSave.GetHashCode(); } if (PasswordMaxAge != null) { hashCode = hashCode * 59 + PasswordMaxAge.GetHashCode(); } if (InitialPasswordChange != null) { hashCode = hashCode * 59 + InitialPasswordChange.GetHashCode(); } if (PasswordHistorySize != null) { hashCode = hashCode * 59 + PasswordHistorySize.GetHashCode(); } if (PasswordExpiryForAdmin != null) { hashCode = hashCode * 59 + PasswordExpiryForAdmin.GetHashCode(); } if (CacheExpiration != null) { hashCode = hashCode * 59 + CacheExpiration.GetHashCode(); } if (EnableRFC7613UsercaseMappedProfile != null) { hashCode = hashCode * 59 + EnableRFC7613UsercaseMappedProfile.GetHashCode(); } return(hashCode); } }
internal static void UnloadContent(bool removeObjects = true) { MyRender.Log.WriteLine("MyRender.UnloadContent - START"); MyRender.Log.IncreaseIndent(); UnloadContent_Video(); foreach (var ro in m_renderObjects) { ro.Value.UnloadContent(); } foreach (var renderComponent in m_renderComponents.Reverse()) { renderComponent.Value.UnloadContent(); } for (int i = 0; i < m_renderTargets.GetLength(0); i++) { DisposeRenderTarget((MyRenderTargets)i); } DisposeSpotShadowRT(); if (m_randomTexture != null) { m_randomTexture.Dispose(); m_randomTexture = null; } UnloadEffects(); Clear(); if (m_fullscreenQuad != null) { m_fullscreenQuad.Dispose(); m_fullscreenQuad = null; } MyTextureManager.UnloadTexture(BlankTexture); MyRenderTexturePool.ReleaseResources(); if (m_spriteBatch != null) { m_spriteBatch.Dispose(); m_spriteBatch = null; } if (DefaultSurface != null) { DefaultSurface.Dispose(); DefaultSurface = null; } if (DefaultDepth != null) { DefaultDepth.Dispose(); DefaultDepth = null; } try { if (GraphicsDevice != null) { GraphicsDevice.SetStreamSource(0, null, 0, 0); GraphicsDevice.Indices = null; GraphicsDevice.PixelShader = null; GraphicsDevice.VertexShader = null; for (int i = 0; i < 16; i++) { GraphicsDevice.SetTexture(i, null); } GraphicsDevice.EvictManagedResources(); } GraphicsDevice = null; } catch (Exception e) { //Because of crash on Win8 Log.WriteLine(e); } MyRender.Log.DecreaseIndent(); MyRender.Log.WriteLine("MyRender.UnloadContent - END"); }
/// <summary> /// Returns true if OrgApacheJackrabbitOakSecurityUserUserConfigurationImplProperties instances are equal /// </summary> /// <param name="other">Instance of OrgApacheJackrabbitOakSecurityUserUserConfigurationImplProperties to be compared</param> /// <returns>Boolean</returns> public bool Equals(OrgApacheJackrabbitOakSecurityUserUserConfigurationImplProperties other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( UsersPath == other.UsersPath || UsersPath != null && UsersPath.Equals(other.UsersPath) ) && ( GroupsPath == other.GroupsPath || GroupsPath != null && GroupsPath.Equals(other.GroupsPath) ) && ( SystemRelativePath == other.SystemRelativePath || SystemRelativePath != null && SystemRelativePath.Equals(other.SystemRelativePath) ) && ( DefaultDepth == other.DefaultDepth || DefaultDepth != null && DefaultDepth.Equals(other.DefaultDepth) ) && ( ImportBehavior == other.ImportBehavior || ImportBehavior != null && ImportBehavior.Equals(other.ImportBehavior) ) && ( PasswordHashAlgorithm == other.PasswordHashAlgorithm || PasswordHashAlgorithm != null && PasswordHashAlgorithm.Equals(other.PasswordHashAlgorithm) ) && ( PasswordHashIterations == other.PasswordHashIterations || PasswordHashIterations != null && PasswordHashIterations.Equals(other.PasswordHashIterations) ) && ( PasswordSaltSize == other.PasswordSaltSize || PasswordSaltSize != null && PasswordSaltSize.Equals(other.PasswordSaltSize) ) && ( OmitAdminPw == other.OmitAdminPw || OmitAdminPw != null && OmitAdminPw.Equals(other.OmitAdminPw) ) && ( SupportAutoSave == other.SupportAutoSave || SupportAutoSave != null && SupportAutoSave.Equals(other.SupportAutoSave) ) && ( PasswordMaxAge == other.PasswordMaxAge || PasswordMaxAge != null && PasswordMaxAge.Equals(other.PasswordMaxAge) ) && ( InitialPasswordChange == other.InitialPasswordChange || InitialPasswordChange != null && InitialPasswordChange.Equals(other.InitialPasswordChange) ) && ( PasswordHistorySize == other.PasswordHistorySize || PasswordHistorySize != null && PasswordHistorySize.Equals(other.PasswordHistorySize) ) && ( PasswordExpiryForAdmin == other.PasswordExpiryForAdmin || PasswordExpiryForAdmin != null && PasswordExpiryForAdmin.Equals(other.PasswordExpiryForAdmin) ) && ( CacheExpiration == other.CacheExpiration || CacheExpiration != null && CacheExpiration.Equals(other.CacheExpiration) ) && ( EnableRFC7613UsercaseMappedProfile == other.EnableRFC7613UsercaseMappedProfile || EnableRFC7613UsercaseMappedProfile != null && EnableRFC7613UsercaseMappedProfile.Equals(other.EnableRFC7613UsercaseMappedProfile) )); }
/// <summary> /// Called when graphics resources need to be unloaded. Override this method to unload any game-specific graphics resources. /// </summary> public override void UnloadContent() { MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().StartProfilingBlock("MyMinerGame::UnloadContent"); MyMwcLog.WriteLine("MyMinerGame.UnloadContent() - START"); MyMwcLog.IncreaseIndent(); if (m_debugFont != null) { m_debugFont.Dispose(); m_debugFont = null; } if (DefaultSurface != null) { DefaultSurface.Dispose(); DefaultSurface = null; } if (DefaultDepth != null) { DefaultDepth.Dispose(); DefaultDepth = null; } // GUI MyGuiManager.UnloadContent(); MyRender.UnloadContent(); MyTextureManager.UnloadContent(); MyModels.UnloadContent(); // Global content //Content.Unload(); // Render MySunGlare.UnloadContent(); MyDebugDrawCachedLines.UnloadContent(); MyDebugDraw.UnloadContent(); //MyRender.UnloadContent(); //it is unloaded in gui gameplay screen MyMwcLog.DecreaseIndent(); MyMwcLog.WriteLine("MyMinerGame.UnloadContent() - END"); GraphicsDevice.SetStreamSource(0, null, 0, 0); GraphicsDevice.Indices = null; GraphicsDevice.VertexDeclaration = null; GraphicsDevice.PixelShader = null; GraphicsDevice.VertexShader = null; for (int i = 0; i < 16; i++) { GraphicsDevice.SetTexture(i, null); } base.UnloadContent(); GC.Collect(); MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().EndProfilingBlock(); }