예제 #1
0
        public override void Sync(SyncContext ctx)
        {
            base.Sync(ctx);

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

            if (ctx.is_read)
            {
                name = "[]" + item_type.name;
            }
        }
예제 #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);
            }
        }
예제 #6
0
 public void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, files);
 }
예제 #7
0
 public void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, ref subj);
 }
예제 #8
0
 public override void Sync(SyncContext ctx)
 {
     base.Sync(ctx);
     Marshall.Sync(ctx, ref _scope_idx);
 }
예제 #9
0
 public virtual void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, ref name);
     Marshall.Sync(ctx, ref type);
 }
예제 #10
0
 public void Sync(SyncContext ctx)
 {
     Marshall.Sync(ctx, ref module_name);
     Marshall.Sync(ctx, ref members);
 }