title: how to override a method of Microsoft Identity?
body: <p>I am newbie in C# and .Net
  I am using a getter of SignInManager in one of my controllers like this:</p>
  
  <pre><code>public CustomSignInManager SignInManager
  {
      get
      {
          return HttpContext.GetOwinContext().Get&lt;CustomSignInManager &gt;();
      }
  }
  </code></pre>
  
  <p>and the CustomSignInManager class is like this:</p>
  
  <pre><code>public class OnlineSmSignInManager : SignInManager&lt;User, int&gt;
  {
      public OnlineSmSignInManager(OnlineSmUserManager userManager, IAuthenticationManager authenticationManager)
          : base(userManager, authenticationManager)
      { }
  }
  </code></pre>
  
  <p>there is a method in Identity's SignInManager class like this:</p>
  
  <pre><code>public virtual async Task&lt;token&gt; SendTwoFactorCodeAsync(string provider)
  {
      TKey userId = await this.GetVerifiedUserIdAsync().WithCurrentCulture&lt;TKey&gt;();
      if ((object) userId == null)
          return false;
  
      string token = await this.UserManager.GenerateTwoFactorTokenAsync(userId, provider).WithCurrentCulture&lt;string&gt;();
      IdentityResult identityResult = await this.UserManager.NotifyTwoFactorTokenAsync(userId, provider, token).WithCurrentCulture&lt;IdentityResult&gt;();
      return token;
  }
  </code></pre>
  
  <p>how can I override it to be like this:</p>