コード例 #1
0
ファイル: ProfileFactory.cs プロジェクト: perl-easj/OOProg
        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);
 }