private static IProfileGateway CreateProfileGateway(AccountName accountName, ProfileName profileName, bool initialized) { var account = ObjectFactory.GetInstance <IAccountCollection>().GetOrCreate(accountName); _profile = account.Profiles.Add(new ProfileCreationArgs(profileName, new object())); if (initialized) { _profile.MarkAsInitialized(); } else { _profile.MarkAsNotInitialized(); } _profile.Save(); return(new ProfileGateway(_profile, accountName, ObjectFactory.GetInstance <ITpBus>())); }
private static IProfileGateway CreateProfileGateway(AccountName accountName, ProfileName profileName, bool initialized) { var account = ObjectFactory.GetInstance<IAccountCollection>().GetOrCreate(accountName); _profile = account.Profiles.Add(new ProfileCreationArgs(profileName, new object())); if(initialized) { _profile.MarkAsInitialized(); } else { _profile.MarkAsNotInitialized(); } _profile.Save(); return new ProfileGateway(_profile, accountName, ObjectFactory.GetInstance<ITpBus>()); }