BlocksContent GetFilenameWithoutPrefix Method Delta Engine Documentation

Namespace: Blocks
Assembly: Blocks (in Blocks.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public string GetFilenameWithoutPrefix(
	string filenameWithPrefix
)

Return Value

Type: String
Remarks

Tests: Blocks.Tests.BlocksContentTests
Examples

1 unit tests call Blocks.BlocksContent.GetFilenameWithoutPrefix(System.String)
[Test, CloseAfterFirstFrame]
public void GetFilenameWithoutPrefix()
{
    var content = new JewelBlocksContent { Prefix = "ABC" };
    Assert.AreEqual("DEF", content.GetFilenameWithoutPrefix("ABCDEF"));
    Assert.Throws<BlocksContent.FilenameWrongPrefixException>(
        () => content.GetFilenameWithoutPrefix("ADEF"));
    Assert.Throws<BlocksContent.FilenameWrongPrefixException>(
        () => content.GetFilenameWithoutPrefix("AAADEF"));
}
See Also