本文整理汇总了C#中ParameterInfo.ParseArgumentString方法的典型用法代码示例。如果您正苦于以下问题:C# ParameterInfo.ParseArgumentString方法的具体用法?C# ParameterInfo.ParseArgumentString怎么用?C# ParameterInfo.ParseArgumentString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterInfo
的用法示例。
在下文中一共展示了ParameterInfo.ParseArgumentString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
private static int Main( string[] args )
{
// Changes the CurrentCulture of the current thread to the invariant
// culture.
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
ParameterInfo paramInfo = new ParameterInfo();
string argsString = "";
foreach( string arg in args )
{
if( argsString.Length == 0 )
argsString = arg;
else
argsString = argsString + " " + arg;
}
args = paramInfo.ParseArgumentString( argsString );
paramInfo.ProcessArgs( args );
if( paramInfo.abort )
return 0;
ConfigureLogDefaults( paramInfo.log_file );
try
{
// get a reference to the engine singleton
Axiom.Core.Root engine = new Root( EngineConfigFile, null );
Configure();
Skeleton skeleton = null;
if( paramInfo.skeleton_file != null )
skeleton = ReadSkeleton( paramInfo.srcDir, paramInfo.skeleton_file );
if( paramInfo.test_physics )
TestPhysics( paramInfo.srcDir, paramInfo.dstDir, "test.physics" );
else if( paramInfo.build_skeleton )
BuildSkeletonMesh( paramInfo.dstDir, paramInfo.last_arg );
else if( paramInfo.animations.Count > 0 )
// we are merging animations
AddAnimations( paramInfo.srcDir, paramInfo.dstDir, paramInfo.out_skeleton_file,
paramInfo.transform, skeleton, paramInfo.animations );
else if( paramInfo.attachPoints.Count > 0 )
AddAttachments( paramInfo.dstDir, paramInfo.out_skeleton_file, skeleton, paramInfo.attachPoints );
else if( paramInfo.manualLodEntries.Count > 0 )
SetupManualLodLevels( paramInfo.srcDir, paramInfo.dstDir, paramInfo.last_arg, paramInfo.manualLodEntries );
else if( paramInfo.lodlevels > 0 )
GenerateLodLevels( paramInfo.srcDir, paramInfo.dstDir, paramInfo.last_arg,
paramInfo.lodlevels, paramInfo.loddist, paramInfo.lodpercent * 0.01f );
else
{
// we are either transforming a collada or ogre mesh, or just getting skeleton and
// mesh data out of one.
ConvertFile( paramInfo.srcDir, paramInfo.dstDir, paramInfo.last_arg, paramInfo.transform,
paramInfo.build_tangents, paramInfo.extract_collision_volumes, paramInfo.optimize_mesh,
paramInfo.skeleton_file );
}
}
catch( Exception e )
{
log.ErrorFormat( "Error converting files: {0}", e );
if( paramInfo.rethrow )
throw;
return 1;
}
return 0;
}