Example #1
0
 static void EncodeIfNotNull(RestrictedDescribed section, ByteBuffer buffer)
 {
     if (section != null)
     {
         section.Encode(buffer);
     }
 }
Example #2
0
        // Transport layer should call Codec to encode/decode frames. It ensures that
        // all dependant static fields in other class are initialized correctly.
        // NETMF does not track cross-class static field/ctor dependancies

        public static void Encode(RestrictedDescribed command, ByteBuffer buffer)
        {
            Fx.Assert(command != null, "command is null!");
            command.Encode(buffer);
        }