protected override void RemoveLinkedAccountClaim(LinkedAccountClaim item)
        {
            var removed =
                this.LinkedAccountClaimsCollection.SingleOrDefault(
                    x =>
                    x.ProviderAccountID == item.ProviderAccountID && x.ProviderName == item.ProviderName &&
                    x.Type == item.Type && x.Value == item.Value);

            this.LinkedAccountClaimsCollection.Remove(removed);
        }
        protected override void AddLinkedAccountClaim(LinkedAccountClaim item)
        {
            var linkedAccountClaim = new NhLinkedAccountClaim();

            linkedAccountClaim.GetType()
            .GetProperty("ProviderAccountID")
            .SetValue(linkedAccountClaim, item.ProviderAccountID);
            linkedAccountClaim.GetType().GetProperty("ProviderName").SetValue(linkedAccountClaim, item.ProviderName);
            linkedAccountClaim.GetType().GetProperty("Type").SetValue(linkedAccountClaim, item.Type);
            linkedAccountClaim.GetType().GetProperty("Value").SetValue(linkedAccountClaim, item.Value);
            linkedAccountClaim.GetType().GetProperty("Account").SetValue(linkedAccountClaim, this);
            this.LinkedAccountClaimsCollection.Add(linkedAccountClaim);
        }
Example #3
0
 protected internal override void RemoveLinkedAccountClaim(LinkedAccountClaim item)
 {
     LinkedAccountClaimCollection.Remove((TLinkedAccountClaim)item);
 }
Example #4
0
 protected internal override void AddLinkedAccountClaim(LinkedAccountClaim item)
 {
     LinkedAccountClaimCollection.Add(new TLinkedAccountClaim {
         ParentKey = this.Key, ProviderName = item.ProviderName, ProviderAccountID = item.ProviderAccountID, Type = item.Type, Value = item.Value
     });
 }
Example #5
0
 protected internal override void AddLinkedAccountClaim(LinkedAccountClaim item)
 {
     LinkedAccountClaimCollection.Add(item);
 }
 protected internal override void AddLinkedAccountClaim(LinkedAccountClaim item)
 {
     LinkedAccountClaimCollection.Add(new RelationalLinkedAccountClaim {
         UserAccountID = this.ID, ProviderName = item.ProviderName, ProviderAccountID = item.ProviderAccountID, Type = item.Type, Value = item.Value
     });
 }
 protected internal override void RemoveLinkedAccountClaim(LinkedAccountClaim item)
 {
     LinkedAccountClaimCollection.Remove(item);
 }
 protected internal override void AddLinkedAccountClaim(LinkedAccountClaim item)
 {
     LinkedAccountClaimCollection.Add(item);
 }
 protected internal override void AddLinkedAccountClaim(LinkedAccountClaim item)
 {
     LinkedAccountClaimCollection.Add(new RelationalLinkedAccountClaim { UserAccountID = this.ID, ProviderName = item.ProviderName, ProviderAccountID = item.ProviderAccountID, Type = item.Type, Value = item.Value });
 }
 protected override void AddLinkedAccountClaim(LinkedAccountClaim item)
 {
     var linkedAccountClaim = new NhLinkedAccountClaim();
     linkedAccountClaim.GetType()
         .GetProperty("ProviderAccountID")
         .SetValue(linkedAccountClaim, item.ProviderAccountID);
     linkedAccountClaim.GetType().GetProperty("ProviderName").SetValue(linkedAccountClaim, item.ProviderName);
     linkedAccountClaim.GetType().GetProperty("Type").SetValue(linkedAccountClaim, item.Type);
     linkedAccountClaim.GetType().GetProperty("Value").SetValue(linkedAccountClaim, item.Value);
     linkedAccountClaim.GetType().GetProperty("Account").SetValue(linkedAccountClaim, this);
     this.LinkedAccountClaimsCollection.Add(linkedAccountClaim);
 }
 protected override void RemoveLinkedAccountClaim(LinkedAccountClaim item)
 {
     var removed =
         this.LinkedAccountClaimsCollection.SingleOrDefault(
             x =>
             x.ProviderAccountID == item.ProviderAccountID && x.ProviderName == item.ProviderName
             && x.Type == item.Type && x.Value == item.Value);
     this.LinkedAccountClaimsCollection.Remove(removed);
 }