19 private string[] localeAlternate =
null;
20 private string title =
null;
21 private string type =
null;
22 private string url =
null;
23 private string description =
null;
24 private string determiner =
null;
25 private string locale =
null;
26 private string siteName =
null;
58 if (!(Doc.
Meta is
null))
85 if (
string.IsNullOrEmpty(Name) ||
string.IsNullOrEmpty(Value))
95 if (
string.IsNullOrEmpty(this.title))
104 if (
string.IsNullOrEmpty(this.type))
114 case "twitter:image":
121 if (
Image.Url == Value)
128 if (!(LastImage is
null))
143 case "og:image:secure_url":
144 if (!(LastImage is
null))
145 LastImage.SecureUrl = Value;
148 case "og:image:type":
149 if (!(LastImage is
null))
150 LastImage.ContentType = Value;
153 case "og:image:width":
154 if (!(LastImage is
null) &&
int.TryParse(Value, out
int i))
158 case "og:image:height":
159 if (!(LastImage is
null) &&
int.TryParse(Value, out i))
160 LastImage.Height = i;
164 case "twitter:image:alt":
165 if (!(LastImage is
null))
166 LastImage.Description = Value;
178 Audio.Add(LastAudio);
181 case "og:audio:secure_url":
182 if (!(LastAudio is
null))
183 LastAudio.SecureUrl = Value;
186 case "og:audio:type":
187 if (!(LastAudio is
null))
188 LastAudio.ContentType = Value;
191 case "og:description":
192 this.description = Value;
195 case "twitter:description":
197 if (
string.IsNullOrEmpty(this.description))
198 this.description = Value;
201 case "og:determiner":
202 this.determiner = Value;
209 case "og:locale:alternate":
217 this.siteName = Value;
229 Video.Add(LastVideo);
232 case "og:video:secure_url":
233 if (!(LastVideo is
null))
234 LastVideo.SecureUrl = Value;
237 case "og:video:type":
238 if (!(LastVideo is
null))
239 LastVideo.ContentType = Value;
242 case "og:video:width":
243 if (!(LastVideo is
null) &&
int.TryParse(Value, out i))
247 case "og:video:height":
248 if (!(LastVideo is
null) &&
int.TryParse(Value, out i))
249 LastVideo.Height = i;
255 if (
string.IsNullOrEmpty(this.title) && !(Doc.
Title is
null))
258 this.images =
Images?.ToArray();
259 this.audio =
Audio?.ToArray();
260 this.video =
Video?.ToArray();
270 set => this.images = value;
279 set => this.audio = value;
288 set => this.video = value;
296 get => this.localeAlternate;
297 set => this.localeAlternate = value;
306 set => this.title = value;
315 set => this.type = value;
324 set => this.url = value;
332 get => this.description;
333 set => this.description = value;
341 get => this.determiner;
342 set => this.determiner = value;
351 set => this.locale = value;
359 get => this.siteName;
360 set => this.siteName = value;
369 if ((
this is
null) ^ (
Meta is
null))
375 if (this.title !=
Meta.title ||
376 this.type !=
Meta.type ||
377 this.url !=
Meta.url ||
378 this.description !=
Meta.description ||
379 this.determiner !=
Meta.determiner ||
380 this.locale !=
Meta.locale ||
381 this.siteName !=
Meta.siteName)
386 if ((this.localeAlternate is
null) ^ (
Meta.localeAlternate is
null))
389 if (!(this.localeAlternate is
null))
391 if ((c = this.localeAlternate.Length) !=
Meta.localeAlternate.Length)
394 for (i = 0; i < c; i++)
396 if (this.localeAlternate[i] !=
Meta.localeAlternate[i])
401 if ((this.images is
null) ^ (
Meta.images is
null))
404 if (!(this.images is
null))
406 if ((c = this.images.Length) !=
Meta.images.Length)
409 for (i = 0; i < c; i++)
416 if ((this.audio is
null) ^ (
Meta.audio is
null))
419 if (!(this.audio is
null))
421 if ((c = this.audio.Length) !=
Meta.audio.Length)
424 for (i = 0; i < c; i++)
431 if ((this.video is
null) ^ (
Meta.video is
null))
434 if (!(this.video is
null))
436 if ((c = this.video.Length) !=
Meta.video.Length)
439 for (i = 0; i < c; i++)
454 if (!(this.title is
null))
455 Result = this.title.GetHashCode();
457 if (!(this.type is
null))
458 Result ^= Result << 5 ^ this.type.GetHashCode();
460 if (!(this.url is
null))
461 Result ^= Result << 5 ^ this.url.GetHashCode();
463 if (!(this.description is
null))
464 Result ^= Result << 5 ^ this.description.GetHashCode();
466 if (!(this.determiner is
null))
467 Result ^= Result << 5 ^ this.determiner.GetHashCode();
469 if (!(this.locale is
null))
470 Result ^= Result << 5 ^ this.locale.GetHashCode();
472 if (!(this.siteName is
null))
473 Result ^= Result << 5 ^ this.siteName.GetHashCode();
475 if (!(this.localeAlternate is
null))
477 foreach (
string s
in this.localeAlternate)
478 Result ^= Result << 5 ^ s.GetHashCode();
481 if (!(this.images is
null))
487 if (!(this.audio is
null))
493 if (!(this.video is
null))
string FullName
Attribute full name (including prefix).
string Value
Attribute value.
Title Title
First TITLE element of document, if found, null otherwise.
IEnumerable< Meta > Meta
META elements found in document, or null if none found.
string InnerText
Inner Text
IEnumerable< HtmlAttribute > Attributes
Attributes, or null if none.
bool HasAttributes
If the element has attributes.
Audio information, as defined by the Open Graph protocol.
Image information, as defined by the Open Graph protocol.
override int GetHashCode()
Video information, as defined by the Open Graph protocol.
Contains meta-data about a page.
PageMetaData()
Contains meta-data about a page.
ImageInformation[] Images
Image representing page.
override int GetHashCode()
string Description
A description of the page.
override bool Equals(object obj)
PageMetaData(HtmlDocument Doc)
Contains meta-data about a page.
string Determiner
A word that appears before the title.
string Url
Canonical URL of page.
string Locale
Locale of information.
string SiteName
Name of web site publishing page
string[] LocaleAlternate
Alternate locales
A chunked list is a linked list of chunks of objects of type T .