示例#1
0
        public RandTempContentFile(string resourceName, bool doNotOverrite = false, StreamFate contentFate = StreamFate.CloseAndDispose)
            : base(resourceName, doNotOverrite, contentFate)
        {
            ContentPath = Path.Combine("Prism_Temp", Guid.NewGuid().ToString());
            FilePath    = Path.Combine("Content", Path.ChangeExtension(ContentPath, "xnb"));

            Init();
        }
示例#2
0
 public TempFile(string path, string resourceName, bool dontOverrite = false, StreamFate contentFate = StreamFate.CloseAndDispose)
     : this(resourceName, dontOverrite, contentFate)
 {
     FilePath = path;
     Init();
 }
示例#3
0
 public TempFile(string path, Stream contents, bool dontOverrite = false, StreamFate contentFate = StreamFate.CloseAndDispose)
     : this(contents, dontOverrite, contentFate)
 {
     FilePath = path;
     Init();
 }
示例#4
0
 public TempFile(string resourceName, bool dontOverrite = false, StreamFate contentFate = StreamFate.CloseAndDispose)
     : this(dontOverrite, contentFate)
 {
     ContentStream = Assembly.GetCallingAssembly().GetManifestResourceStream(resourceName);
 }
示例#5
0
 public TempFile(Stream contents, bool dontOverrite = false, StreamFate contentFate = StreamFate.CloseAndDispose)
     : this(dontOverrite, contentFate)
 {
     ContentStream = contents;
 }
示例#6
0
 public TempFile(bool dontOverrite = false, StreamFate contentFate = StreamFate.CloseAndDispose)
 {
     ContentFate   = contentFate;
     DoNotOverrite = dontOverrite;
 }
示例#7
0
        public RandTempFile(string resourceName, string directory = null, string extension = null, bool doNotOverrite = false, StreamFate contentFate = StreamFate.CloseAndDispose)
            : base(resourceName, doNotOverrite, contentFate)
        {
            FilePath = Path.Combine(directory ?? Path.GetTempPath(), Path.ChangeExtension(Guid.NewGuid().ToString(), extension));

            Init();
        }