private void FixupModProfile(ModProfile previousValue) { if (previousValue != null && previousValue.ModActions.Contains(this)) { previousValue.ModActions.Remove(this); } if (ModProfile != null) { if (!ModProfile.ModActions.Contains(this)) { ModProfile.ModActions.Add(this); } if (UserID != ModProfile.ID) { UserID = ModProfile.ID; } } }
public static void AttachModProfile(ModProfile modProfile) { if (modProfile.ID != CfIdentity.UserID) { throw new ArgumentException("CfPrincipal InflateModDetails: modProfile.ID != ProfileID"); } System.Web.HttpContext.Current.Items["modProfile"] = modProfile; }