Example #1
0
 protected override void Write(BinaryWriter w, object o, WriterContext ctx)
 {
     if (ctx.RegisterCache(o))
     {
         w.Write(SecondaryId);
         w.Write(ctx.Key);
     }
     else
     {
         w.Write(PrimaryId);
         w.Write((string)o);
     }
 }
Example #2
0
            protected override void Write(BinaryWriter w, object o, WriterContext ctx)
            {
                if (ctx.RegisterCache(o))
                {
                    w.Write(SecondaryId);
                    w.Write(ctx.Key);
                }
                else
                {
                    w.Write(PrimaryId);
                    w.Write(((Type)o).FullName);

                    // We should cache the name of the assembly
                    w.Write(((Type)o).Assembly.FullName);
                }
            }
Example #3
0
			protected override void Write (BinaryWriter w, object o, WriterContext ctx)
			{
				if (ctx.RegisterCache (o)) {
					w.Write (SecondaryId);
					w.Write (ctx.Key);
				} else {
					w.Write (PrimaryId);
					w.Write (((Type) o).FullName);

					// We should cache the name of the assembly
					w.Write (((Type) o).Assembly.FullName);
				}
			}
Example #4
0
			protected override void Write (BinaryWriter w, object o, WriterContext ctx)
			{
				if (ctx.RegisterCache (o)) {
					w.Write (SecondaryId);
					w.Write (ctx.Key);
				} else {
					w.Write (PrimaryId);
					w.Write ((string)o);
				}
			}