Updating ContentProperties

Aug 28, 2012 at 4:56 PM
Edited Aug 28, 2012 at 4:59 PM

I see that there is an internal class AsfFileUpdateOptions() - how do I update those few properties?

Coordinator
Sep 8, 2012 at 2:42 PM

gxdata - this class is used by the fluent interface. You can look at the interface IAsfFileUpdateOptions to see what properties you can update:

    public interface IAsfFileUpdateOptions
    {
        IAsfFileUpdateOptions WithFileCreationTime(DateTime fileCreationTime);
        IAsfFileUpdateOptions WithAuthor(string author);
        IAsfFileUpdateOptions WithDescription(string description);
        IAsfFileUpdateOptions WithTitle(string title);
        IAsfFileUpdateOptions WithRating(string rating);
        IAsfFileUpdateOptions WithCopyright(string copyright);
        void Update(string targetFileName = null);
    }

There's also an example on how to use this in the unit tests:

            AsfFile.From(testVideoFileName)
                   .WithFileCreationTime(DateTime.Parse("2/27/2011"))
                   .WithAuthor("Fred Fish")
                   .WithDescription("Some lengthy description of the content")
                   .WithCopyright("Copyright (c) 2011")
                   .WithTitle("Some title")
                   .WithRating("5.0")
                   .Update(testBackupFileName);

Hope this helps!