Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialization template for the object decoding static function has changed in v.1.7 #1

Closed
hhblaze opened this issue Aug 24, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@hhblaze
Copy link
Owner

hhblaze commented Aug 24, 2018

Binary Biser decoding became faster starting from v1.7, but for that objects decoding initialization template must be changed - compiler will show errors in those parts.

Example:

 public static T4 BiserDecode(byte[] enc = null, Biser.Decoder extDecoder = null) 
        {
            Biser.Decoder decoder = null;
            if (extDecoder == null)
            {
                if (enc == null || enc.Length == 0)
                    return null;
                decoder = new Biser.Decoder(enc);
                if (decoder.CheckNull())
                    return null;
            }
            else
            {
/************************ MUST BE LIKE THIS **************************/
//STARTING FROM v1.7, init template has changed
                  if (extDecoder.CheckNull())
                    return null;
                else
                    decoder = extDecoder;
/************************************************************************/
            }

            T4m = new T4();  

            m.Data = decoder.GetByteArray();
            m.Id = decoder.GetULong();
            
            return m;
        }
@hhblaze hhblaze changed the title Initialization template of the object decoding static functions has change in v.1.7 Initialization template of the object decoding static functions has changed in v.1.7 Aug 24, 2018
@hhblaze hhblaze added the enhancement New feature or request label Aug 24, 2018
@hhblaze hhblaze changed the title Initialization template of the object decoding static functions has changed in v.1.7 Initialization template for the object decoding static function has changed in v.1.7 Aug 24, 2018
@hhblaze
Copy link
Owner Author

hhblaze commented Feb 5, 2019

Objects autogenerator is released https://www.nuget.org/packages/BiserObjectify/ is released.

@hhblaze hhblaze closed this as completed Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant