CSharpTest.Net
TempPath Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.IO Namespace > TempFile Class : TempPath Property

Glossary Item Box

Returns the temporary file path being managed.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property TempPath As String
C# 
public string TempPath {get;}

Example

Library/Library.Test/TestXhtmlValid.cs

C#Copy Code
string doc = @"<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">
<html>
    <head><title>required</title></head>
    <body></body>
</html>
";

XhtmlValidation v = new XhtmlValidation(XhtmlDTDSpecification.XhtmlStrict_10);

using (TempFile temp = new TempFile())
{
    temp.WriteAllText(doc);
    v.Validate(temp.TempPath);
}
VB.NETCopy Code
Dim doc As String = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">" & vbCr & vbLf & "            <html>" & vbCr & vbLf & "                <head><title>required</title></head>" & vbCr & vbLf & "                <body></body>" & vbCr & vbLf & "            </html>" & vbCr & vbLf & "            "

Dim v As New XhtmlValidation(XhtmlDTDSpecification.XhtmlStrict_10)

Using temp As New TempFile()
    temp.WriteAllText(doc)
    v.Validate(temp.TempPath)
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Reference

TempFile Class
TempFile Members

Used By

SampleCustomTypeTest.TestCommonConfiguration()
TestBackupAndRecovery.TestRestoreLargeLog()
TestBPlusTreeOptions.TestReadOnly()
BPlusTree TestFileSerialized.BTreeFactory.Create()
BPlusTree DictionaryTestsVersion2.BTreeFactory.Create()
TestBulkInsert.TestMergeRandomInFile()
TestMultiInstance.TestReadOnlyCopy()
TestMultiInstance.TestSyncFromLogging()
TestTransactionLog.TestTransactionLogOptions()
TestTransactionLog.TestBenchmarkWriteSpeed()
TestTransactionLog.TestLogWithJunkAppended()
TestTransactionLog.TestLogCorruption()
ThreadedBTreeTest.TestAbortWritersAndRecover()
ThreadedBTreeTest.TestErrorsOnInsertAndDelete()
ThreadedBTreeTest.TestConcurrentCreateReadUpdateDelete8000()
ThreadedMassInsertTest.TestConcurrency()
TestResXtoMc.TestEmptyResXToMc()
TestResXtoMc.TestSimpleStringResXToMc()
TestResXtoMc.TestResXToMcWithCategoryFacilityAndSource()
TestResXtoMc.TestFormatResXToMc()
TestResXtoMc.TestFormatWithSuffixResXToMc()
TestResXtoMc.TestBuildMcFromResX()
TestResXtoMc.TestDuplicateHResult()
TestResXtoMc.TestDuplicateNameInFiles()
TestResXtoMc.TestDuplicateCategorySameIdAndName()
TestResXtoMc.TestDuplicateCategorySameIdDifferentName()
TestResXtoMcByProject.TestGenerateWin32Resource()
TestResXtoMcByProject.TestProjectResXVersionByAssembly()
TestResXtoMcByProject.TestCreateMessageAssembly()
TestResXtoMcByProject.TestProjectResXWithBadAssemblyInfo()
XhtmlValidation.Validate(TextReader)
TempFile TempFile.FromCopy(String)
Byte[] TempFile.ReadAllBytes()
TempFile.WriteAllBytes(Byte[])
String TempFile.ReadAllText()
TempFile.WriteAllText(String)
TempFile.Delete()
Stream TempFile.Create()
Stream TempFile.Open()
Stream TempFile.Read(FileShare)
TempFile.CopyTo(String,Boolean)

Source Code

Library/IO/TempFile.cs

Generated with Document! X 2011 by Innovasys