internal IPermission ToPermission(bool ignoreTypeLoadFailures) { IPermission permission = XMLUtil.CreatePermission(this, PermissionState.None, ignoreTypeLoadFailures); if (permission == null) { return(null); } permission.FromXml(this); PermissionToken.GetToken(permission); return(permission); }
internal IPermission ToPermission(bool ignoreTypeLoadFailures) { IPermission ip = XMLUtil.CreatePermission(this, PermissionState.None, ignoreTypeLoadFailures); if (ip == null) { return(null); } ip.FromXml(this); // Get the permission token here to ensure that the token // type is updated appropriately now that we've loaded the type. PermissionToken token = PermissionToken.GetToken(ip); BCLDebug.Assert((token.m_type & PermissionTokenType.DontKnow) == 0, "Token type not properly assigned"); return(ip); }