Haze.Pck/PckExtensions.cs
/// <summary>
/// Adds entry from specified text.
/// </summary>
/// <param name="resPath">The resPath to entry. It should start with res://</param>
Adds entry from specified text.
Adds entry from specified text .
public static void Add(this PckPacker source, string resPath, string text, Encoding encoding)
        {
            if (source is null)
                throw new ArgumentNullException(nameof(source));
            if (text is null)
                throw new ArgumentNullException(nameof(source));
            if (encoding is null)
                throw new ArgumentNullException(nameof(source));
            var bytes = encoding.GetBytes(text);
            source.Add(new PckPackerEntryBytes(resPath, bytes));
        }
public static void Add ( this PckPacker source , string resPath , string text , Encoding encoding ) { if ( source is null ) throw new ArgumentNullException ( nameof ( source ) ) ; if ( text is null ) throw new ArgumentNullException ( nameof ( source ) ) ; if ( encoding is null ) throw new ArgumentNullException ( nameof ( source ) ) ; var bytes = encoding . GetBytes ( text ) ; source . Add ( new PckPackerEntryBytes ( resPath , bytes ) ) ; }
Adds entry from specified text.
Adds entry from specified text .
PckPacker
this
resPath
string
The resPath to entry. It should start with res.
The resPath to entry . It should start with res .
text
string
encoding
Encoding