Exemplo n.º 1
0
        public void SetEventArgThisIdx(string eventName, int idx)
        {
            ThrowErrorIfCompleted();

            EventWrapperMemberBuilderInfo eventMemberInfo =
                this.EventBuilderInfos?.FirstOrDefault(evt => evt.WrapperSymbolName == eventName);

            if (eventMemberInfo != null)
            {
                eventMemberInfo.IndexInputParamToReplaceByThis = idx;
            }
        }
Exemplo n.º 2
0
        public void SetEventBuilder(IMemberCodeBuilder <IEventSymbol> propBuilder, params string[] eventNames)
        {
            ThrowErrorIfCompleted();

            foreach (string eventName in eventNames)
            {
                EventWrapperMemberBuilderInfo eventBuilderInfo =
                    this.EventBuilderInfos.Single(builderInfo => builderInfo.WrapperSymbolName == eventName);

                eventBuilderInfo.TheCodeBuilder = propBuilder;
            }
        }