示例#1
0
        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));
        }
示例#2
0
 public Profile(string userName, int imageId)
 {
     UserName  = userName;
     ImageData = ImageDB.Read(imageId);
 }