Ejemplo n.º 1
0
        public override void Sync(SyncContext ctx)
        {
            base.Sync(ctx);

            Marshall.Sync(ctx, ref inherits);
            Marshall.Sync(ctx, ref members);
        }
Ejemplo n.º 2
0
 public void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, items);
     if (ctx.is_read)
     {
         Update();
     }
 }
Ejemplo n.º 3
0
 public void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, ref ret_type);
     Marshall.Sync(ctx, arg_types);
     if (ctx.is_read)
     {
         Update();
     }
 }
Ejemplo n.º 4
0
        public override void Sync(SyncContext ctx)
        {
            Marshall.Sync(ctx, ref item_type);

            if (ctx.is_read)
            {
                name = "[]" + item_type.name;
            }
        }
Ejemplo n.º 5
0
        public void Sync(SyncContext ctx)
        {
            if (ctx.is_read)
            {
                types = ((SymbolFactory)ctx.factory).types;
            }
            else if (string.IsNullOrEmpty(_name))
            {
                throw new Exception("TypeProxy name is empty");
            }

            Marshall.Sync(ctx, ref _name);

            IMarshallableGeneric mg = null;

            if (ctx.is_read)
            {
                Marshall.SyncGeneric(ctx, ref mg);
                type = (IType)mg;
            }
            else
            {
                var resolved = Get();
                //TODO: make this check more robust
                bool defined_in_scope =
                    resolved is Symbol symb &&
                    (symb.scope is ModuleScope ||
                     symb is BuiltInSymbol ||
                     symb is ClassSymbolNative ||
                     symb is InterfaceSymbolNative ||
                     symb is EnumSymbol ||
                     (symb is ArrayTypeSymbol && !(symb is GenericArrayTypeSymbol))
                    );

                //NOTE: we want to marshall only those types which are not
                //      defined elsewhere otherwise we just want to keep
                //      string reference at them
                if (!defined_in_scope)
                {
                    mg = resolved as IMarshallableGeneric;
                    if (mg == null)
                    {
                        throw new Exception("Type is not marshallable: " + (resolved != null ? resolved.GetType().Name + " " : "<null> ") + _name);
                    }
                }
                Marshall.SyncGeneric(ctx, ref mg);
            }
        }
Ejemplo n.º 6
0
 public void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, files);
 }
Ejemplo n.º 7
0
 public void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, ref subj);
 }
Ejemplo n.º 8
0
 public override void Sync(SyncContext ctx)
 {
     base.Sync(ctx);
     Marshall.Sync(ctx, ref _scope_idx);
 }
Ejemplo n.º 9
0
 public virtual void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, ref name);
     Marshall.Sync(ctx, ref type);
 }
Ejemplo n.º 10
0
 public void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, ref module_name);
     Marshall.Sync(ctx, ref members);
 }