internal void Read(IBinaryAccessor accessor, ProjectReadState state)
        {
            _flags  = accessor.ReadInt32();
            _flags2 = accessor.ReadInt32();

            if (NameChanged)
            {
                _name = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (NamespaceChanged)
            {
                _namespace = state.GetString(accessor.Read7BitEncodedInt());
            }
        }
        internal void Read(IBinaryAccessor accessor, ProjectReadState state)
        {
            _flags = accessor.ReadInt32();

            if (NameChanged)
            {
                _name = state.GetString(accessor.Read7BitEncodedInt());
            }

            ReadNamespaces(accessor, state);
            ReadTypes(accessor, state);
            ReadMethods(accessor, state);
            ReadFields(accessor, state);
            ReadProperties(accessor, state);
            ReadEvents(accessor, state);
        }
        private void ReadResources(IBinaryAccessor accessor, ProjectReadState state)
        {
            int count = accessor.Read7BitEncodedInt();

            if (count == 0)
            {
                return;
            }

            _resources = new Dictionary <string, ProjectResource>(count, StringComparer.OrdinalIgnoreCase);

            for (int i = 0; i < count; i++)
            {
                string name = state.GetString(accessor.Read7BitEncodedInt());
                _resources.Add(name, new ProjectResource(accessor, state));
            }
        }
        private void ReadNamespaces(IBinaryAccessor accessor, ProjectReadState state)
        {
            int count = accessor.Read7BitEncodedInt();

            if (count == 0)
            {
                return;
            }

            _namespaces = new Dictionary <string, ProjectNamespace>(count);

            for (int i = 0; i < count; i++)
            {
                string name = state.GetString(accessor.Read7BitEncodedInt());
                _namespaces.Add(name, new ProjectNamespace(accessor, state));
            }
        }
        internal void Read(IBinaryAccessor accessor, ProjectReadState state)
        {
            _filePath   = ProjectHelper.MakeAbsolutePath(state.GetString(accessor.Read7BitEncodedInt()), state.BasePath);
            _outputPath = ProjectHelper.MakeAbsolutePath(state.GetString(accessor.Read7BitEncodedInt()), state.BasePath);
            _flags      = accessor.ReadInt32();
            _flags2     = accessor.ReadInt32();
            _flags3     = accessor.ReadInt32();

            if (NameChanged)
            {
                _name = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (CultureChanged)
            {
                _culture = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (VersionChanged)
            {
                _version = new Version(accessor.ReadUInt16(), accessor.ReadUInt16(), accessor.ReadUInt16(), accessor.ReadUInt16());
            }

            if (TitleChanged)
            {
                _title = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (DescriptionChanged)
            {
                _description = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (CompanyChanged)
            {
                _company = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (ProductChanged)
            {
                _product = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (CopyrightChanged)
            {
                _copyright = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (TrademarkChanged)
            {
                _trademark = state.GetString(accessor.Read7BitEncodedInt());
            }

            if (accessor.ReadBoolean())
            {
                _sign = new ProjectAssemblySign(accessor, state);
            }

            ReadModules(accessor, state);
            ReadResources(accessor, state);
        }
 internal void Read(IBinaryAccessor accessor, ProjectReadState state)
 {
     _keyFilePath = ProjectHelper.MakeAbsolutePath(state.GetString(accessor.Read7BitEncodedInt()), state.BasePath);
     _password    = state.GetString(accessor.Read7BitEncodedInt());
     _delaySign   = accessor.ReadBoolean();
 }