Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AlternateView.cs
Go to the documentation of this file.
1using System.IO;
3using System.Text;
4
6
8{
10
12 {
13 get
14 {
15 if (disposed)
16 {
17 throw new ObjectDisposedException(GetType().FullName);
18 }
20 }
21 }
22
23 public Uri? BaseUri
24 {
25 get
26 {
27 return base.ContentLocation;
28 }
29 set
30 {
31 base.ContentLocation = value;
32 }
33 }
34
35 internal AlternateView()
36 {
37 }
38
39 public AlternateView(string fileName)
40 : base(fileName)
41 {
42 }
43
44 public AlternateView(string fileName, string? mediaType)
45 : base(fileName, mediaType)
46 {
47 }
48
49 public AlternateView(string fileName, ContentType? contentType)
50 : base(fileName, contentType)
51 {
52 }
53
54 public AlternateView(Stream contentStream)
55 : base(contentStream)
56 {
57 }
58
59 public AlternateView(Stream contentStream, string? mediaType)
60 : base(contentStream, mediaType)
61 {
62 }
63
64 public AlternateView(Stream contentStream, ContentType? contentType)
65 : base(contentStream, contentType)
66 {
67 }
68
69 public static AlternateView CreateAlternateViewFromString(string content)
70 {
71 AlternateView alternateView = new AlternateView();
72 alternateView.SetContentFromString(content, null, string.Empty);
73 return alternateView;
74 }
75
76 public static AlternateView CreateAlternateViewFromString(string content, Encoding? contentEncoding, string? mediaType)
77 {
78 AlternateView alternateView = new AlternateView();
79 alternateView.SetContentFromString(content, contentEncoding, mediaType);
80 return alternateView;
81 }
82
83 public static AlternateView CreateAlternateViewFromString(string content, ContentType? contentType)
84 {
85 AlternateView alternateView = new AlternateView();
86 alternateView.SetContentFromString(content, contentType);
87 return alternateView;
88 }
89
90 protected override void Dispose(bool disposing)
91 {
92 if (!disposed)
93 {
94 if (disposing && _linkedResources != null)
95 {
97 }
98 base.Dispose(disposing);
99 }
100 }
101}
AlternateView(Stream contentStream)
override void Dispose(bool disposing)
AlternateView(Stream contentStream, ContentType? contentType)
LinkedResourceCollection LinkedResources
static AlternateView CreateAlternateViewFromString(string content, ContentType? contentType)
static AlternateView CreateAlternateViewFromString(string content, Encoding? contentEncoding, string? mediaType)
AlternateView(Stream contentStream, string? mediaType)
AlternateView(string fileName, ContentType? contentType)
AlternateView(string fileName, string? mediaType)
LinkedResourceCollection _linkedResources
static AlternateView CreateAlternateViewFromString(string content)
void SetContentFromString(string content, ContentType contentType)