private SegmentsStruct() : base("PathmapSegment") { this.Kind = "struct"; Node_A = new InternalVar("Node_A", CompletionItemKind.Property) { Documentation = "The primary node of this segment. This returns a number which is the index of the node in the pathmap." }; Node_B = new InternalVar("Node_B", CompletionItemKind.Property) { Documentation = "The secondary node of this segment. This returns a number which is the index of the node in the pathmap." }; Attribute_AB = new InternalVar("Attribute_AB", CompletionItemKind.Property) { Documentation = "The attribute of this segment when traveling from node A to B." }; Attribute_BA = new InternalVar("Attribute_BA", CompletionItemKind.Property) { Documentation = "The attribute of this segment when traveling from node B to A." }; _scope.AddNativeVariable(Node_A); _scope.AddNativeVariable(Node_B); _scope.AddNativeVariable(Attribute_AB); _scope.AddNativeVariable(Attribute_BA); }
public JsonType(JObject jsonData) : base("JSON") { objectScope.AddNativeMethod(new GetJsonPropertyFunction(this)); foreach (JProperty prop in jsonData.Children <JProperty>()) { JsonProperty newProperty = new JsonProperty(prop); Properties.Add(newProperty); objectScope.AddNativeVariable(newProperty.Var); } }