本文整理汇总了C#中ReleaseFlags类的典型用法代码示例。如果您正苦于以下问题:C# ReleaseFlags类的具体用法?C# ReleaseFlags怎么用?C# ReleaseFlags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReleaseFlags类属于命名空间,在下文中一共展示了ReleaseFlags类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsFlagged
public bool IsFlagged( ReleaseFlags flag ) {
return ( Flags & flag ) == flag;
}
示例2: ReleaseFlagsToString
public static string ReleaseFlagsToString( ReleaseFlags flags ) {
StringBuilder sb = new StringBuilder();
if( ( flags & ReleaseFlags.APIChange ) == ReleaseFlags.APIChange ) sb.Append( 'A' );
if( ( flags & ReleaseFlags.Bugfix ) == ReleaseFlags.Bugfix ) sb.Append( 'B' );
if( ( flags & ReleaseFlags.ConfigFormatChange ) == ReleaseFlags.ConfigFormatChange ) sb.Append( 'C' );
if( ( flags & ReleaseFlags.Dev ) == ReleaseFlags.Dev ) sb.Append( 'D' );
if( ( flags & ReleaseFlags.Feature ) == ReleaseFlags.Feature ) sb.Append( 'F' );
if( ( flags & ReleaseFlags.MapFormatChange ) == ReleaseFlags.MapFormatChange ) sb.Append( 'M' );
if( ( flags & ReleaseFlags.PlayerDBFormatChange ) == ReleaseFlags.PlayerDBFormatChange ) sb.Append( 'P' );
if( ( flags & ReleaseFlags.Security ) == ReleaseFlags.Security ) sb.Append( 'S' );
if( ( flags & ReleaseFlags.Unstable ) == ReleaseFlags.Unstable ) sb.Append( 'U' );
if( ( flags & ReleaseFlags.Optimized ) == ReleaseFlags.Optimized ) sb.Append( 'O' );
return sb.ToString();
}
示例3: ReleaseFlagsToStringArray
public static string[] ReleaseFlagsToStringArray( ReleaseFlags flags ) {
List<string> list = new List<string>();
if( ( flags & ReleaseFlags.APIChange ) == ReleaseFlags.APIChange ) list.Add( "API Changes" );
if( ( flags & ReleaseFlags.Bugfix ) == ReleaseFlags.Bugfix ) list.Add( "Fixes" );
if( ( flags & ReleaseFlags.ConfigFormatChange ) == ReleaseFlags.ConfigFormatChange )
list.Add( "Config Changes" );
if( ( flags & ReleaseFlags.Dev ) == ReleaseFlags.Dev ) list.Add( "Developer" );
if( ( flags & ReleaseFlags.Feature ) == ReleaseFlags.Feature ) list.Add( "New Features" );
if( ( flags & ReleaseFlags.MapFormatChange ) == ReleaseFlags.MapFormatChange )
list.Add( "Map Format Changes" );
if( ( flags & ReleaseFlags.PlayerDBFormatChange ) == ReleaseFlags.PlayerDBFormatChange )
list.Add( "PlayerDB Changes" );
if( ( flags & ReleaseFlags.Security ) == ReleaseFlags.Security ) list.Add( "Security Patch" );
if( ( flags & ReleaseFlags.Unstable ) == ReleaseFlags.Unstable ) list.Add( "Unstable" );
if( ( flags & ReleaseFlags.Optimized ) == ReleaseFlags.Optimized ) list.Add( "Optimized" );
return list.ToArray();
}
示例4: ReleaseInfo
internal ReleaseInfo( int version, int revision, DateTime releaseDate,
string summary, string changeLog, ReleaseFlags releaseType ) {
Version = version;
Revision = revision;
Date = releaseDate;
Summary = summary;
ChangeLog = changeLog.Split( new[] { '\n' } );
Flags = releaseType;
}