namespace AssetStudio
{
///
/// Specifies the style of a sequence.
///
public enum SequenceStyle
{
///
/// The block sequence style
///
Block,
///
/// The block sequence style but with curly braces
///
BlockCurve,
///
/// The flow sequence style
///
Flow,
///
/// Single line with hex data
///
Raw,
}
public static class SequenceStyleExtensions
{
public static bool IsRaw(this SequenceStyle _this)
{
return _this == SequenceStyle.Raw;
}
public static bool IsAnyBlock(this SequenceStyle _this)
{
return _this == SequenceStyle.Block || _this == SequenceStyle.BlockCurve;
}
///
/// Get scalar style corresponding to current sequence style
///
/// Sequence style
/// Corresponding scalar style
public static ScalarStyle ToScalarStyle(this SequenceStyle _this)
{
return _this == SequenceStyle.Raw ? ScalarStyle.Hex : ScalarStyle.Plain;
}
}
}