Пример #1
0
 private void CompileAndAddAutoEventMethodsToType(JsClass jsClass, EventDeclaration node, IEvent evt, EventScriptSemantics options, string backingFieldName)
 {
     if (options.AddMethod != null && options.AddMethod.GenerateCode) {
         var compiled = CreateMethodCompiler().CompileAutoEventAdder(evt, options, backingFieldName);
         AddCompiledMethodToType(jsClass, evt.AddAccessor, options.AddMethod, new JsMethod(evt.AddAccessor, options.AddMethod.Name, new string[0], compiled));
     }
     if (options.RemoveMethod != null && options.RemoveMethod.GenerateCode) {
         var compiled = CreateMethodCompiler().CompileAutoEventRemover(evt, options, backingFieldName);
         AddCompiledMethodToType(jsClass, evt.RemoveAccessor, options.RemoveMethod, new JsMethod(evt.RemoveAccessor, options.RemoveMethod.Name, new string[0], compiled));
     }
 }
		void IMetadataImporter.SetEventSemantics(IEvent evt,EventScriptSemantics semantics) {
		}
		public virtual void SetEventSemantics(IEvent evt,EventScriptSemantics semantics) {
			_prev.SetEventSemantics(evt, semantics);
		}
		public void SetEventSemantics(IEvent evt,EventScriptSemantics semantics) {
			_eventSemantics[evt] = semantics;
			_ignoredMembers.Add(evt);
		}