Skip to content
Permalink
Browse files

[Assets] Package.Profile is now properly deserialized by discarding d…

…efault value
  • Loading branch information
xen2 committed Sep 15, 2018
1 parent bf97559 commit 8f017b48e11b36766c54c25c189caebc00acc7bc
@@ -158,7 +158,7 @@ public Guid Id
/// Gets the profile.
/// </summary>
/// <value>The profiles.</value>
[DataMember(50)]
[DataMember(50, DataMemberMode.Assign)]
public PackageProfile Profile { get; set; } = PackageProfile.NewShared();

/// <summary>
@@ -18,15 +18,11 @@ public sealed class PackageProfile
{
public static SettingsContainer SettingsContainer = new SettingsContainer();

private readonly AssetFolderCollection assetFolders;

/// <summary>
/// Initializes a new instance of the <see cref="PackageProfile"/> class.
/// </summary>
public PackageProfile()
{
assetFolders = new AssetFolderCollection();
OutputGroupDirectories = new Dictionary<string, UDirectory>();
}

/// <summary>
@@ -49,14 +45,14 @@ public PackageProfile(params AssetFolder[] folders)
/// </summary>
/// <value>The platform.</value>
[DataMember(20)]
public PlatformType Platform { get; set; }
public PlatformType Platform { get; set; } = PlatformType.Shared;

/// <summary>
/// Gets the asset directories to lookup.
/// </summary>
/// <value>The asset directories.</value>
[DataMember(40)]
public AssetFolderCollection AssetFolders => assetFolders;
public AssetFolderCollection AssetFolders { get; } = new AssetFolderCollection();

/// <summary>
/// Gets the resource directories to lookup.
@@ -70,7 +66,7 @@ public PackageProfile(params AssetFolder[] folders)
/// </summary>
/// <value>The output group directories.</value>
[DataMember(50)]
public Dictionary<string, UDirectory> OutputGroupDirectories { get; private set; }
public Dictionary<string, UDirectory> OutputGroupDirectories { get; } = new Dictionary<string, UDirectory>();

/// <summary>
/// Creates a a default shared package profile.

0 comments on commit 8f017b4

Please sign in to comment.
You can’t perform that action at this time.