我正在尝试反编译System.IdentityModel.Services.dll
,但没有一个反编译工具显示方法详细信息
我甚至无法在ILDASM中获取这些方法的IL。 ILSpy也是如此。
例如:System.IdentityModel.Services.SessionAuthenticationModule
ILDASM:
.method family hidebysig newslot virtual
instance void OnAuthenticateRequest(object sender,
class [mscorlib]System.EventArgs eventArgs) cil managed
{
// Code size 0 (0x0)
} // end of method SessionAuthenticationModule::OnAuthenticateRequest
.method family hidebysig instance class [mscorlib]System.Collections.ObjectModel.ReadOnlyCollection`1<class [mscorlib]System.Security.Claims.ClaimsIdentity>
ValidateSessionToken(class [System.IdentityModel]System.IdentityModel.Tokens.SessionSecurityToken sessionSecurityToken) cil managed
{
// Code size 0 (0x0)
} // end of method SessionAuthenticationModule::ValidateSessionToken
我原以为至少IL总是可用的。情况不是这样吗?
答案 0 :(得分:0)
r#能够找到微软参考源,而Reflector能够生成:
protected ReadOnlyCollection<ClaimsIdentity> ValidateSessionToken(SessionSecurityToken sessionSecurityToken)
{
ReadOnlyCollection<ClaimsIdentity> onlys;
SessionSecurityTokenHandler handler = base.FederationConfiguration.IdentityConfiguration.SecurityTokenHandlers[typeof(SessionSecurityToken)] as SessionSecurityTokenHandler;
if (handler == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString("ID4011", new object[] { typeof(SessionSecurityToken) })));
}
try
{
onlys = new ReadOnlyCollection<ClaimsIdentity>(handler.ValidateToken(sessionSecurityToken, this.CookieHandler.Path));
}
catch (SecurityTokenExpiredException exception)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FederatedSessionExpiredException(DateTime.UtcNow, sessionSecurityToken.ValidTo, exception));
}
catch (SecurityTokenNotYetValidException exception2)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FederationException(SR.GetString("ID1071", new object[] { DateTime.UtcNow, sessionSecurityToken.ValidFrom }), exception2));
}
return onlys;
}
ILSpy是 生成非常相似的代码。所以我猜你看错了 集会或遗失其他东西。