ZeroInstall.Publish.SignedFeed.Load C# (CSharp) Method

Load() private method

private Load ( [ path ) : SignedFeed
path [
return SignedFeed
        public static SignedFeed Load([NotNull] string path)
        {
            #region Sanity checks
            if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
            #endregion

            return new SignedFeed(XmlStorage.LoadXml<Feed>(path), FeedUtils.GetKey(path, OpenPgpFactory.CreateDefault()));
        }

Usage Example

示例#1
0
 /// <summary>
 /// Loads a feed from an XML file (feed).
 /// </summary>
 /// <param name="path">The file to load from.</param>
 /// <returns>A <see cref="FeedEditing"/> containing the loaded feed.</returns>
 /// <exception cref="IOException">A problem occurred while reading the file.</exception>
 /// <exception cref="UnauthorizedAccessException">Read access to the file is not permitted.</exception>
 /// <exception cref="InvalidDataException">A problem occurred while deserializing the XML data.</exception>
 public new static FeedEditing Load(string path)
 => new FeedEditing(SignedFeed.Load(path))
 {
     Path = path
 };
All Usage Examples Of ZeroInstall.Publish.SignedFeed::Load