public ProfileV2 Create(string userName, int imageId) { ProfileExtrinsic pe = new ProfileExtrinsic(userName); ProfileIntrinsic pi; if (_intrinsicStateData.ContainsKey(imageId)) { pi = _intrinsicStateData[imageId]; } else { pi = new ProfileIntrinsic(ImageDB.Read(imageId)); _intrinsicStateData[imageId] = pi; } return(new ProfileV2(pe, pi)); }
public Profile(string userName, int imageId) { UserName = userName; ImageData = ImageDB.Read(imageId); }