Using system;
namespace Pattern {public abstract class subject {public abstract void request ();} /// /// Summary description for Class1 /// summary> public class proxy: subject {public proxy () {//. // Todo: add constructor logic here ///} private readsubject = new readsubject (); public override void request () {before (); rs.Request (); after ();} private void before () {system. Console.WriteLine ("Proxy Subject Before Request");
Private void after () {system.console.writeline ("proxy subjectAfter request");}
PUBLIC CLASS READSUBJECT: SUBJECT {public {} public override void request () {system.console.writeline ("real subject request");}
}} // proxy mode Subject s = new proxy (); s.Request ();