public CodegenExpression Make( CodegenMethodScope parent, SAIFFInitializeSymbol symbols, CodegenClassScope classScope) { var method = parent.MakeChild(typeof(PatternContext), GetType(), classScope); method.Block .DeclareVar<PatternContext>("ctx", NewInstance(typeof(PatternContext))) .SetProperty( Ref("ctx"), "MatchedEventMapMeta", LocalMethod(MatchedEventMapMeta.MakeCodegen(classScope, method, symbols))); if (StreamNumber != 0) { method.Block.SetProperty(Ref("ctx"), "StreamNumber", Constant(StreamNumber)); } if (IsContextDeclaration) { method.Block .SetProperty(Ref("ctx"), "IsContextDeclaration", Constant(IsContextDeclaration)) .SetProperty(Ref("ctx"), "NestingLevel", Constant(NestingLevel)) .SetProperty(Ref("ctx"), "IsStartCondition", Constant(IsStartCondition)); } method.Block.MethodReturn(Ref("ctx")); return LocalMethod(method); }
public override void ValidateFactory() { _contextBuiltinProps = ContextPropertyEventType.GetInitiatedTerminatedType(); LinkedHashSet <String> allTags = new LinkedHashSet <String>(); ContextPropertyEventType.AddEndpointTypes(FactoryContext.ContextName, _detail.Start, _contextBuiltinProps, allTags); ContextPropertyEventType.AddEndpointTypes(FactoryContext.ContextName, _detail.End, _contextBuiltinProps, allTags); _matchedEventMapMeta = new MatchedEventMapMeta(allTags, false); }
public PatternContext( int streamNumber, MatchedEventMapMeta matchedEventMapMeta, bool isContextDeclaration, int nestingLevel, bool isStartCondition) { StreamNumber = streamNumber; MatchedEventMapMeta = matchedEventMapMeta; IsContextDeclaration = isContextDeclaration; NestingLevel = nestingLevel; IsStartCondition = isStartCondition; }