TriAxis.RunSharp.EventGen.WithStandardImplementation C# (CSharp) 메소드

WithStandardImplementation() 공개 메소드

public WithStandardImplementation ( ) : EventGen
리턴 EventGen
		public EventGen WithStandardImplementation()
		{
			if ((object)_handler == null)
			{
				if (IsStatic)
					_handler = _owner.Private.Static.Field(_type, Name);
				else
					_handler = _owner.Private.Field(_type, Name);

				CodeGen g = AddMethod();
				g.AssignAdd(_handler, g.Arg("handler"));
				_adder.GetMethodBuilder().SetImplementationFlags(MethodImplAttributes.IL | MethodImplAttributes.Managed | MethodImplAttributes.Synchronized);

				g = RemoveMethod();
				g.AssignSubtract(_handler, g.Arg("handler"));
				_remover.GetMethodBuilder().SetImplementationFlags(MethodImplAttributes.IL | MethodImplAttributes.Managed | MethodImplAttributes.Synchronized);
			};
				
			return this;
		}