private static SDataExtensionContext GetContext(IExtensibleSyndicationObject entry, bool createIfMissing) { Guard.ArgumentNotNull(entry, "entry"); var extension = entry.Extensions.OfType <SDataExtension>().FirstOrDefault(); if (extension == null) { if (!createIfMissing) { return(null); } extension = new SDataExtension(); entry.AddExtension(extension); } return(extension.Context); }
private static SDataExtensionContext GetContext(IExtensibleSyndicationObject entry, bool createIfMissing) { Guard.ArgumentNotNull(entry, "entry"); var extension = entry.Extensions.OfType<SDataExtension>().FirstOrDefault(); if (extension == null) { if (!createIfMissing) { return null; } extension = new SDataExtension(); entry.AddExtension(extension); } return extension.Context; }