⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mockobjects.cs

📁 .NET 2.0模式开发实战源代码,使用C#说明
💻 CS
字号:
using com.devspace.commons.Tracer;namespace Chap03MockObjects {    public delegate void FeedbackString( string message);    class NoCallbackDefinedException : ApplicationFatalException {        public NoCallbackDefinedException() : base( "No callback is defined") {        }        public static System.Exception Instantiate() {            return new NoCallbackDefinedException();        }    }    public class Callback {        private static FeedbackString _feedback;        public static FeedbackString CBFeedbackString {            get {                if( _feedback == null) {                    throw new NoCallbackDefinedException();                }                return _feedback;            }            set {                _feedback = value;            }        }    }    public class Console {        public Console() {        }        public static void WriteLine( string message) {            Callback.CBFeedbackString( message);        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -