AlbedoDatabaseGenerator.Database.Entry.Export C# (CSharp) Метод

Export() публичный Метод

public Export ( string _Indent ) : string
_Indent string
Результат string
            public string Export( string _Indent )
            {
                m_Indent = _Indent;
                string	JSON = L( "{" );

                // Write standard infos
                Indent();
                JSON += L( "RelativePath : \"" + Path.GetDirectoryName( m_RelativePath ).Replace( '\\', '/' ) + "\"," );
                JSON += L( "FriendlyName : \"" + m_FriendlyName + "\"," );
                JSON += L( "Description : \"" + FormatDescription() + "\"," );
                if ( m_OverviewImageRelativePath != null )
                    JSON += L( "OverviewImagePath: \"" + m_OverviewImageRelativePath.Replace( '\\', '/' ) + "\"," );

                string	Tags = "";
                if ( m_TagType != TAGS_TYPE.NONE )
                    Tags += "," + m_TagType.ToString();
                if ( m_TagColor != TAGS_COLOR.NONE )
                    Tags += "," + m_TagColor.ToString();
                if ( m_TagShade != TAGS_SHADE.NONE )
                    Tags += "," + m_TagShade.ToString();
                if ( m_TagNature != TAGS_NATURE.NONE )
                    Tags += "," + m_TagNature.ToString()
                        + (m_TagNature != TAGS_NATURE.NATURE ? ",NATURE" : "");	// Always append parent tag as soon as we have a tag belonging to the category
                if ( m_TagFurniture != TAGS_FURNITURE.NONE )
                    Tags += "," + m_TagFurniture.ToString()
                        + (m_TagFurniture != TAGS_FURNITURE.FURNITURE ? ",FURNITURE" : "");	// Always append parent tag as soon as we have a tag belonging to the category
                if ( m_TagConstruction != TAGS_CONSTRUCTION.NONE )
                    Tags += "," + m_TagConstruction.ToString()
                        + (m_TagConstruction != TAGS_CONSTRUCTION.CONSTRUCTION ? ",CONSTRUCTION" : "");	// Always append parent tag as soon as we have a tag belonging to the category
                if ( m_TagModifiers != TAGS_MODIFIERS.NONE )
                    Tags += "," + m_TagModifiers.ToString();
                if ( Tags != "" )
                    Tags = Tags.Remove( 0, 1 );	// Remove first comma
                JSON += L( "Tags : \"" + Tags + "\"," );

                // Write texture infos
                if ( m_Manifest != null )
                {
                    JSON += L( "TextureInfos : {" );
                    Indent();

                    JSON += L( "ISOSpeed : " + m_Manifest.m_ISOSpeed + "," );
                    JSON += L( "ShutterSpeed : " + m_Manifest.m_ShutterSpeed + "," );
                    JSON += L( "Aperture : " + m_Manifest.m_Aperture + "," );

                    JSON += L( "ThumbnailFileName : \"" + F( ThumbnailFileName.FullName ) + "\"," );
                    JSON += L( "TextureFileName : \"" + F( m_Manifest.GetFullPath( m_Manifest.m_CalibratedTextureFileName ) ) + "\"," );
                    JSON += L( "PackagePath : \"" + F( m_Manifest.GetFullPath( "" ) ) + "\"," );
                    JSON += L( "TextureWidth : " + m_Manifest.m_CalibratedTextureWidth + "," );
                    JSON += L( "TextureHeight : " + m_Manifest.m_CalibratedTextureHeight + "," );
                    if ( OverviewImageFileName != null )
                        JSON += L( "OverviewImageFileName : \"" + F( OverviewImageFileName.FullName ) + "\"," );

                    {	// Swatches
                        JSON += L( "Swatches : {" );
                        Indent();

                        JSON += L( "Min : " ) + ExportSwatch( m_Manifest.m_SwatchMin );
                        JSON += L( "Max : " ) + ExportSwatch( m_Manifest.m_SwatchMax );
                        JSON += L( "Avg : " ) + ExportSwatch( m_Manifest.m_SwatchAvg );

                        {	// Custom
                            JSON += L( "Custom : [" );
                            Indent();
                            foreach ( Manifest.Swatch CS in m_Manifest.m_CustomSwatches )
                                JSON += ExportSwatch( CS );
                            UnIndent();
                            JSON += L( "]" );
                        }

                        UnIndent();
                        JSON += L( "}" );
                    }

                    UnIndent();
                    JSON += L( "}" );
                }

                UnIndent();
                JSON += L( "}," );
                return JSON;
            }