本文整理汇总了C#中FlatRedBall.Glue.SaveClasses.ReferencedFileSave.GetCanUseContentPipeline方法的典型用法代码示例。如果您正苦于以下问题:C# ReferencedFileSave.GetCanUseContentPipeline方法的具体用法?C# ReferencedFileSave.GetCanUseContentPipeline怎么用?C# ReferencedFileSave.GetCanUseContentPipeline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlatRedBall.Glue.SaveClasses.ReferencedFileSave
的用法示例。
在下文中一共展示了ReferencedFileSave.GetCanUseContentPipeline方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateIncludedAndExcluded
private void UpdateIncludedAndExcluded(ReferencedFileSave instance)
{
ResetToDefault();
AssetTypeInfo ati = instance.GetAssetTypeInfo();
ExcludeMember("InvalidFileNameCharacters");
ExcludeMember("ToStringDelegate");
ExcludeMember("Properties");
ContainerType containerType = instance.GetContainerType();
if (containerType == ContainerType.Entity)
{
// We do this because this is set automatically if the Entity is unique
ExcludeMember("IsSharedStatic");
// We do this because whether the objects from a file are manually updated or not
// should be up to the entity, not the source file.
ExcludeMember("IsManuallyUpdated");
}
if (containerType == ContainerType.Entity || ati == null || ati.QualifiedRuntimeTypeName.QualifiedType != "Microsoft.Xna.Framework.Media.Song")
{
ExcludeMember("DestroyOnUnload");
}
#region Extension-based additions/removals
string extension = FileManager.GetExtension(instance.Name);
if (extension != "csv" && !instance.TreatAsCsv)
{
ExcludeMember("CreatesDictionary");
ExcludeMember("IsDatabaseForLocalizing");
ExcludeMember("UniformRowType");
}
else
{
IncludeMember("UniformRowType", typeof(ReferencedFileSave), new AvailablePrimitiveTypeArraysStringConverter());
}
if ((extension != "txt" && extension != "csv") ||
(extension == "txt" && instance.TreatAsCsv == false)
)
{
ExcludeMember("CsvDelimiter");
}
if (extension != "txt")
{
ExcludeMember("TreatAsCsv");
}
if (extension == "png")
{
Attribute[] fileDetailsCategoryAttribute = new Attribute[]{
new CategoryAttribute("File Details")};
IncludeMember("ImageWidth", typeof(int), null, GetImageWidth, null, fileDetailsCategoryAttribute);
IncludeMember("ImageHeight", typeof(int), null, GetImageHeight, null, fileDetailsCategoryAttribute);
}
if (extension == "emix")
{
Attribute[] fileDetailsCategoryAttribute = new Attribute[]{
new CategoryAttribute("File Details")};
IncludeMember("EquilibriumParticleCount", typeof(float), null, GetEquilibriumParticleCount, null, fileDetailsCategoryAttribute);
IncludeMember("BurstParticleCount", typeof(float), null, GetBurstParticleCount, null, fileDetailsCategoryAttribute);
}
#endregion
AddProjectSpecificFileMember();
if (!instance.LoadedAtRuntime)
{
ExcludeMember("IsSharedStatic");
ExcludeMember("IsManuallyUpdated");
ExcludeMember("LoadedOnlyWhenReferenced");
ExcludeMember("HasPublicProperty");
ExcludeMember("InstanceName");
ExcludeMember("IncludeDirectoryRelativeToContainer");
}
if (ati == null || string.IsNullOrEmpty(ati.MakeManuallyUpdatedMethod))
{
ExcludeMember("IsManuallyUpdated");
}
if (!instance.GetCanUseContentPipeline())
{
ExcludeMember("UseContentPipeline");
}
if (!instance.UseContentPipeline || ati.QualifiedRuntimeTypeName.QualifiedType != "Microsoft.Xna.Framework.Graphics.Texture2D")
{
ExcludeMember("TextureFormat");
}
//.........这里部分代码省略.........