• 大小: 195KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-07
  • 语言: C#
  • 标签: c#  

资源简介

c# ,设计模式,装饰者模式,星巴兹咖啡,基本上就是head first 上的例子的C#实现,根据自己的理解,作了一点点改动,可以直接运行。

资源截图

代码片段和文件信息

using System;
using decorat.emums;

namespace decorat.baseclass
{
    public abstract class Beverage
    {
        private BeverageSize size;

        public virtual string GetDescription()
        {
            return “Unknown Beverage“;
        }

        public BeverageSize Size
        {
            get
            {
                return size;
            }
            set
            {
                size = value;
            }
        }

        public abstract double Cost();
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        525  2010-12-31 22:54  Decorate\decorat\baseclass\Beverages.cs

     文件       6144  2011-01-01 00:24  Decorate\decorat\bin\Debug\decorat.dll

     文件      32256  2011-01-01 00:24  Decorate\decorat\bin\Debug\decorat.pdb

     文件       3025  2011-01-01 00:22  Decorate\decorat\decorat.csproj

     文件        168  2010-12-31 22:41  Decorate\decorat\decorat.csproj.user

     文件        199  2011-01-01 00:22  Decorate\decorat\decorator\CondimentDecorator.cs

     文件       1066  2011-01-01 00:22  Decorate\decorat\decorators\Mocha.cs

     文件        528  2011-01-01 00:22  Decorate\decorat\decorators\Soy.cs

     文件        553  2011-01-01 00:22  Decorate\decorat\decorators\SteamedMilk.cs

     文件        531  2011-01-01 00:22  Decorate\decorat\decorators\Whip.cs

     文件        461  2010-12-31 23:24  Decorate\decorat\decortornember\DarkRoast.cs

     文件        445  2010-12-31 23:24  Decorate\decorat\decortornember\Decaf.cs

     文件        865  2010-12-31 23:24  Decorate\decorat\decortornember\Expresso.cs

     文件        465  2010-12-31 23:24  Decorate\decorat\decortornember\HouseBlend.cs

     文件        284  2010-12-31 23:13  Decorate\decorat\emums\BeverageEnumerators.cs

     文件        284  2011-01-01 00:24  Decorate\decorat\obj\Debug\decorat.csproj.FileListAbsolute.txt

     文件       6144  2011-01-01 00:24  Decorate\decorat\obj\Debug\decorat.dll

     文件      32256  2011-01-01 00:24  Decorate\decorat\obj\Debug\decorat.pdb

     文件       1450  2010-12-31 21:39  Decorate\decorat\Properties\AssemblyInfo.cs

     文件        190  2010-12-31 21:39  Decorate\Decorate.4.0.resharper

     文件       6135  2011-01-01 00:25  Decorate\Decorate.4.0.resharper.user

     文件       1392  2011-01-01 00:25  Decorate\Decorate.sln

    ..A..H.     38400  2011-01-01 00:25  Decorate\Decorate.suo

     文件       6144  2011-01-01 00:24  Decorate\decorator\bin\decorat.dll

     文件      32256  2011-01-01 00:24  Decorate\decorator\bin\decorat.pdb

     文件       5120  2011-01-01 00:24  Decorate\decorator\bin\decorator.dll

     文件      11776  2011-01-01 00:24  Decorate\decorator\bin\decorator.pdb

     文件       4325  2011-01-01 00:22  Decorate\decorator\decorator.csproj

     文件       1226  2011-01-01 00:24  Decorate\decorator\decorator.csproj.user

     文件        541  2011-01-01 00:22  Decorate\decorator\Default.aspx

............此处省略52个文件信息

评论

共有 条评论