コード例 #1
0
        internal void Write(IBinaryAccessor accessor, ProjectWriteState state)
        {
            accessor.Write((int)_flags);
            accessor.Write((int)_flags2);

            if (NameChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_name));
            }

            if (NamespaceChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_namespace));
            }
        }
コード例 #2
0
        internal void Write(IBinaryAccessor accessor, ProjectWriteState state)
        {
            accessor.Write((int)_flags);

            if (NameChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_name));
            }

            WriteNamespaces(accessor, state);
            WriteTypes(accessor, state);
            WriteMethods(accessor, state);
            WriteFields(accessor, state);
            WriteProperties(accessor, state);
            WriteEvents(accessor, state);
        }
コード例 #3
0
        private void WriteResources(IBinaryAccessor accessor, ProjectWriteState state)
        {
            int count = _resources != null ? _resources.Count : 0;

            accessor.Write7BitEncodedInt(count);

            if (count == 0)
            {
                return;
            }

            foreach (var kvp in _resources)
            {
                accessor.Write7BitEncodedInt(state.SetString(kvp.Key));
                kvp.Value.Write(accessor, state);
            }
        }
コード例 #4
0
        internal void Write(IBinaryAccessor accessor, ProjectWriteState state)
        {
            accessor.Write7BitEncodedInt(state.SetString(ProjectHelper.MakeRelativePath(_filePath, state.BasePath)));
            accessor.Write7BitEncodedInt(state.SetString(ProjectHelper.MakeRelativePath(_outputPath, state.BasePath)));
            accessor.Write((int)_flags);
            accessor.Write((int)_flags2);
            accessor.Write((int)_flags3);

            if (NameChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_name));
            }

            if (CultureChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_culture));
            }

            if (VersionChanged)
            {
                accessor.Write((ushort)_version.Major);
                accessor.Write((ushort)_version.Minor);
                accessor.Write((ushort)_version.Build);
                accessor.Write((ushort)_version.Revision);
            }

            if (TitleChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_title));
            }

            if (DescriptionChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_description));
            }

            if (CompanyChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_company));
            }

            if (ProductChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_product));
            }

            if (CopyrightChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_copyright));
            }

            if (TrademarkChanged)
            {
                accessor.Write7BitEncodedInt(state.SetString(_trademark));
            }

            if (_sign != null)
            {
                accessor.Write(true);
                _sign.Write(accessor, state);
            }
            else
            {
                accessor.Write(false);
            }

            WriteModules(accessor, state);
            WriteResources(accessor, state);
        }
コード例 #5
0
 internal void Write(IBinaryAccessor accessor, ProjectWriteState state)
 {
     accessor.Write7BitEncodedInt(state.SetString(ProjectHelper.MakeRelativePath(_keyFilePath, state.BasePath)));
     accessor.Write7BitEncodedInt(state.SetString(_password));
     accessor.Write((bool)_delaySign);
 }