Пример #1
0
        internal static Version ToManaged(Version_StructInternal _internal_struct)
        {
            var _external_struct = new Version();

            _external_struct.Major    = _internal_struct.Major;
            _external_struct.Minor    = _internal_struct.Minor;
            _external_struct.Micro    = _internal_struct.Micro;
            _external_struct.Revision = _internal_struct.Revision;
            _external_struct.Flavor   = Eina.StringConversion.NativeUtf8ToManagedString(_internal_struct.Flavor);
            _external_struct.Build_id = Eina.StringConversion.NativeUtf8ToManagedString(_internal_struct.Build_id);

            return(_external_struct);
        }
Пример #2
0
        internal static Version_StructInternal ToInternal(Version _external_struct)
        {
            var _internal_struct = new Version_StructInternal();

            _internal_struct.Major    = _external_struct.Major;
            _internal_struct.Minor    = _external_struct.Minor;
            _internal_struct.Micro    = _external_struct.Micro;
            _internal_struct.Revision = _external_struct.Revision;
            _internal_struct.Flavor   = Eina.MemoryNative.StrDup(_external_struct.Flavor);
            _internal_struct.Build_id = Eina.MemoryNative.StrDup(_external_struct.Build_id);

            return(_internal_struct);
        }