protected internal override CapnpStruct VisitStruct(CapnpStruct @struct)
        {
            if (@struct.Id == null)
            {
                // Note that TopScope is the parent scope here (i.e. not yet the current struct)
                @struct.Id = _GenerateId(@struct);
            }

            return(base.VisitStruct(@struct));
        }
Esempio n. 2
0
        protected internal virtual CapnpStruct VisitStruct(CapnpStruct @struct)
        {
            if (!mEnableNestedType)
            {
                return(@struct);
            }

            @struct.Structs    = @struct.Structs.Select(s => VisitStruct(s)).ToArray();
            @struct.Interfaces = @struct.Interfaces.Select(i => VisitInterface(i)).ToArray();

            DisableNestedType();

            @struct.Enumerations   = @struct.Enumerations.Select(e => VisitEnum(e)).ToArray();
            @struct.Fields         = @struct.Fields.Select(f => VisitField(f)).ToArray();
            @struct.AnnotationDefs = @struct.AnnotationDefs.Select(ad => VisitAnnotationDecl(ad)).ToArray();
            @struct.Annotations    = @struct.Annotations.Select(a => VisitAnnotation(a)).ToArray();
            @struct.Usings         = @struct.Usings.Select(u => VisitUsing(u)).ToArray();
            @struct.Constants      = @struct.Constants.Select(c => VisitConst(c)).ToArray();

            EnableNestedType();

            return(@struct);
        }
Esempio n. 3
0
 public StructValue(CapnpStruct type) : base(type)
 {
 }
Esempio n. 4
0
 protected internal override CapnpStruct VisitStruct(CapnpStruct @struct)
 {
     _ValidateAnnotations(@struct.Annotations, AnnotationTypes.@struct);
     _ValidateHaveId(@struct);
     return(base.VisitStruct(@struct));
 }