PclExport
Assembly: ServiceStack.Text.dll
Declaration
public abstract class PclExport
Properties
Reflection
Declaration
public static ReflectionOptimizer Reflection { get; }
Fields
Instance
Declaration
public static PclExport Instance
EmptyTask
DirSep
AltDirSep
DirSeps
Declaration
public static readonly char[] DirSeps
Declaration
public string PlatformName
RegexOptions
Declaration
public RegexOptions RegexOptions
InvariantComparison
Declaration
public StringComparison InvariantComparison
InvariantComparisonIgnoreCase
Declaration
public StringComparison InvariantComparisonIgnoreCase
InvariantComparer
Declaration
public StringComparer InvariantComparer
InvariantComparerIgnoreCase
Declaration
public StringComparer InvariantComparerIgnoreCase
Methods
Declaration
public static bool ConfigureProvider(string typeName)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.String | typeName |
Declaration
public static void Configure(PclExport instance)
Parameters
ReadAllText(String)
Declaration
public abstract string ReadAllText(string filePath)
Returns
System.String
Parameters
Type | Name |
---|
System.String | filePath |
IsAnonymousType(Type)
Declaration
public virtual bool IsAnonymousType(Type type)
Returns
System.Boolean
Parameters
ToInvariantUpper(Char)
Declaration
public virtual string ToInvariantUpper(char value)
Returns
System.String
Parameters
FileExists(String)
Declaration
public virtual bool FileExists(string filePath)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.String | filePath |
DirectoryExists(String)
Declaration
public virtual bool DirectoryExists(string dirPath)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.String | dirPath |
CreateDirectory(String)
Declaration
public virtual void CreateDirectory(string dirPath)
Parameters
Type | Name |
---|
System.String | dirPath |
RegisterLicenseFromConfig()
Declaration
public virtual void RegisterLicenseFromConfig()
GetEnvironmentVariable(String)
Declaration
public virtual string GetEnvironmentVariable(string name)
Returns
System.String
Parameters
Type | Name |
---|
System.String | name |
GetFileNames(String, String)
Declaration
public virtual string[] GetFileNames(string dirPath, string searchPattern = null)
Returns
System.String[]
Parameters
Type | Name |
---|
System.String | dirPath |
System.String | searchPattern |
GetDirectoryNames(String, String)
Declaration
public virtual string[] GetDirectoryNames(string dirPath, string searchPattern = null)
Returns
System.String[]
Parameters
Type | Name |
---|
System.String | dirPath |
System.String | searchPattern |
WriteLine(String)
Declaration
public virtual void WriteLine(string line)
Parameters
Type | Name |
---|
System.String | line |
WriteLine(String, Object[])
Declaration
public virtual void WriteLine(string line, params object[] args)
Parameters
Type | Name |
---|
System.String | line |
System.Object[] | args |
Config(HttpWebRequest, Nullable<Boolean>, Nullable<TimeSpan>, Nullable<TimeSpan>, String, Nullable<Boolean>)
Declaration
public virtual void Config(HttpWebRequest req, bool? allowAutoRedirect = null, TimeSpan? timeout = null, TimeSpan? readWriteTimeout = null, string userAgent = null, bool? preAuthenticate = null)
Parameters
Type | Name |
---|
System.Net.HttpWebRequest | req |
System.Nullable<System.Boolean> | allowAutoRedirect |
System.Nullable<System.TimeSpan> | timeout |
System.Nullable<System.TimeSpan> | readWriteTimeout |
System.String | userAgent |
System.Nullable<System.Boolean> | preAuthenticate |
AddCompression(WebRequest)
Declaration
public virtual void AddCompression(WebRequest webRequest)
Parameters
Type | Name |
---|
System.Net.WebRequest | webRequest |
GetRequestStream(WebRequest)
Declaration
public virtual Stream GetRequestStream(WebRequest webRequest)
Returns
System.IO.Stream
Parameters
Type | Name |
---|
System.Net.WebRequest | webRequest |
GetResponse(WebRequest)
Declaration
public virtual WebResponse GetResponse(WebRequest webRequest)
Returns
System.Net.WebResponse
Parameters
Type | Name |
---|
System.Net.WebRequest | webRequest |
GetResponseAsync(WebRequest)
Declaration
public virtual Task<WebResponse> GetResponseAsync(WebRequest webRequest)
Returns
System.Threading.Tasks.Task<System.Net.WebResponse>
Parameters
Type | Name |
---|
System.Net.WebRequest | webRequest |
IsDebugBuild(Assembly)
Declaration
public virtual bool IsDebugBuild(Assembly assembly)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.Reflection.Assembly | assembly |
MapAbsolutePath(String, String)
Declaration
public virtual string MapAbsolutePath(string relativePath, string appendPartialPathModifier)
Returns
System.String
Parameters
Type | Name |
---|
System.String | relativePath |
System.String | appendPartialPathModifier |
LoadAssembly(String)
Declaration
public virtual Assembly LoadAssembly(string assemblyPath)
Returns
System.Reflection.Assembly
Parameters
Type | Name |
---|
System.String | assemblyPath |
Declaration
public virtual void AddHeader(WebRequest webReq, string name, string value)
Parameters
Type | Name |
---|
System.Net.WebRequest | webReq |
System.String | name |
System.String | value |
SetUserAgent(HttpWebRequest, String)
Declaration
public virtual void SetUserAgent(HttpWebRequest httpReq, string value)
Parameters
Type | Name |
---|
System.Net.HttpWebRequest | httpReq |
System.String | value |
SetContentLength(HttpWebRequest, Int64)
Declaration
public virtual void SetContentLength(HttpWebRequest httpReq, long value)
Parameters
Type | Name |
---|
System.Net.HttpWebRequest | httpReq |
System.Int64 | value |
SetAllowAutoRedirect(HttpWebRequest, Boolean)
Declaration
public virtual void SetAllowAutoRedirect(HttpWebRequest httpReq, bool value)
Parameters
Type | Name |
---|
System.Net.HttpWebRequest | httpReq |
System.Boolean | value |
SetKeepAlive(HttpWebRequest, Boolean)
Declaration
public virtual void SetKeepAlive(HttpWebRequest httpReq, bool value)
Parameters
Type | Name |
---|
System.Net.HttpWebRequest | httpReq |
System.Boolean | value |
GetAllAssemblies()
Declaration
public virtual Assembly[] GetAllAssemblies()
Returns
System.Reflection.Assembly[]
FindType(String, String)
Declaration
public virtual Type FindType(string typeName, string assemblyName)
Returns
System.Type
Parameters
Type | Name |
---|
System.String | typeName |
System.String | assemblyName |
GetAssemblyCodeBase(Assembly)
Declaration
public virtual string GetAssemblyCodeBase(Assembly assembly)
Returns
System.String
Parameters
Type | Name |
---|
System.Reflection.Assembly | assembly |
GetAssemblyPath(Type)
Declaration
public virtual string GetAssemblyPath(Type source)
Returns
System.String
Parameters
Type | Name |
---|
System.Type | source |
GetAsciiString(Byte[])
Declaration
public virtual string GetAsciiString(byte[] bytes)
Returns
System.String
Parameters
Type | Name |
---|
System.Byte[] | bytes |
GetAsciiString(Byte[], Int32, Int32)
Declaration
public virtual string GetAsciiString(byte[] bytes, int index, int count)
Returns
System.String
Parameters
Type | Name |
---|
System.Byte[] | bytes |
System.Int32 | index |
System.Int32 | count |
GetAsciiBytes(String)
Declaration
public virtual byte[] GetAsciiBytes(string str)
Returns
System.Byte[]
Parameters
GetUTF8Encoding(Boolean)
Declaration
public virtual Encoding GetUTF8Encoding(bool emitBom = false)
Returns
System.Text.Encoding
Parameters
Type | Name |
---|
System.Boolean | emitBom |
CreateGetter(PropertyInfo)
Declaration
[Obsolete("ReflectionOptimizer.CreateGetter")]
public GetMemberDelegate CreateGetter(PropertyInfo propertyInfo)
Returns
ServiceStack.GetMemberDelegate
Parameters
Type | Name |
---|
System.Reflection.PropertyInfo | propertyInfo |
CreateGetter<T>(PropertyInfo)
Declaration
[Obsolete("ReflectionOptimizer.CreateGetter")]
public GetMemberDelegate<T> CreateGetter<T>(PropertyInfo propertyInfo)
Returns
ServiceStack.GetMemberDelegate<T>
Parameters
Type | Name |
---|
System.Reflection.PropertyInfo | propertyInfo |
Type Parameters
CreateSetter(PropertyInfo)
Declaration
[Obsolete("ReflectionOptimizer.CreateSetter")]
public SetMemberDelegate CreateSetter(PropertyInfo propertyInfo)
Returns
ServiceStack.SetMemberDelegate
Parameters
Type | Name |
---|
System.Reflection.PropertyInfo | propertyInfo |
CreateSetter<T>(PropertyInfo)
Declaration
[Obsolete("ReflectionOptimizer.CreateSetter")]
public SetMemberDelegate<T> CreateSetter<T>(PropertyInfo propertyInfo)
Returns
ServiceStack.SetMemberDelegate<T>
Parameters
Type | Name |
---|
System.Reflection.PropertyInfo | propertyInfo |
Type Parameters
CreateGetter(FieldInfo)
Declaration
[Obsolete("ReflectionOptimizer.CreateGetter")]
public virtual GetMemberDelegate CreateGetter(FieldInfo fieldInfo)
Returns
ServiceStack.GetMemberDelegate
Parameters
Type | Name |
---|
System.Reflection.FieldInfo | fieldInfo |
CreateGetter<T>(FieldInfo)
Declaration
[Obsolete("ReflectionOptimizer.CreateGetter")]
public virtual GetMemberDelegate<T> CreateGetter<T>(FieldInfo fieldInfo)
Returns
ServiceStack.GetMemberDelegate<T>
Parameters
Type | Name |
---|
System.Reflection.FieldInfo | fieldInfo |
Type Parameters
CreateSetter(FieldInfo)
Declaration
[Obsolete("ReflectionOptimizer.CreateSetter")]
public virtual SetMemberDelegate CreateSetter(FieldInfo fieldInfo)
Returns
ServiceStack.SetMemberDelegate
Parameters
Type | Name |
---|
System.Reflection.FieldInfo | fieldInfo |
CreateSetter<T>(FieldInfo)
Declaration
[Obsolete("ReflectionOptimizer.CreateSetter")]
public virtual SetMemberDelegate<T> CreateSetter<T>(FieldInfo fieldInfo)
Returns
ServiceStack.SetMemberDelegate<T>
Parameters
Type | Name |
---|
System.Reflection.FieldInfo | fieldInfo |
Type Parameters
InSameAssembly(Type, Type)
Declaration
public virtual bool InSameAssembly(Type t1, Type t2)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.Type | t1 |
System.Type | t2 |
GetGenericCollectionType(Type)
Declaration
public virtual Type GetGenericCollectionType(Type type)
Returns
System.Type
Parameters
ToXsdDateTimeString(DateTime)
Declaration
public virtual string ToXsdDateTimeString(DateTime dateTime)
Returns
System.String
Parameters
Type | Name |
---|
System.DateTime | dateTime |
ToLocalXsdDateTimeString(DateTime)
Declaration
public virtual string ToLocalXsdDateTimeString(DateTime dateTime)
Returns
System.String
Parameters
Type | Name |
---|
System.DateTime | dateTime |
ParseXsdDateTime(String)
Declaration
public virtual DateTime ParseXsdDateTime(string dateTimeStr)
Returns
System.DateTime
Parameters
Type | Name |
---|
System.String | dateTimeStr |
ParseXsdDateTimeAsUtc(String)
Declaration
public virtual DateTime ParseXsdDateTimeAsUtc(string dateTimeStr)
Returns
System.DateTime
Parameters
Type | Name |
---|
System.String | dateTimeStr |
ToStableUniversalTime(DateTime)
Declaration
public virtual DateTime ToStableUniversalTime(DateTime dateTime)
Returns
System.DateTime
Parameters
Type | Name |
---|
System.DateTime | dateTime |
GetDictionaryParseMethod<TSerializer>(Type)
Declaration
public virtual ParseStringDelegate GetDictionaryParseMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns
ServiceStack.Text.Common.ParseStringDelegate
Parameters
Type Parameters
GetDictionaryParseStringSpanMethod<TSerializer>(Type)
Declaration
public virtual ParseStringSpanDelegate GetDictionaryParseStringSpanMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns
ServiceStack.Text.Common.ParseStringSpanDelegate
Parameters
Type Parameters
GetSpecializedCollectionParseMethod<TSerializer>(Type)
Declaration
public virtual ParseStringDelegate GetSpecializedCollectionParseMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns
ServiceStack.Text.Common.ParseStringDelegate
Parameters
Type Parameters
GetSpecializedCollectionParseStringSpanMethod<TSerializer>(Type)
Declaration
public virtual ParseStringSpanDelegate GetSpecializedCollectionParseStringSpanMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns
ServiceStack.Text.Common.ParseStringSpanDelegate
Parameters
Type Parameters
GetJsReaderParseMethod<TSerializer>(Type)
Declaration
public virtual ParseStringDelegate GetJsReaderParseMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns
ServiceStack.Text.Common.ParseStringDelegate
Parameters
Type Parameters
GetJsReaderParseStringSpanMethod<TSerializer>(Type)
Declaration
public virtual ParseStringSpanDelegate GetJsReaderParseStringSpanMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns
ServiceStack.Text.Common.ParseStringSpanDelegate
Parameters
Type Parameters
InitHttpWebRequest(HttpWebRequest, Nullable<Int64>, Boolean, Boolean)
Declaration
public virtual void InitHttpWebRequest(HttpWebRequest httpReq, long? contentLength = null, bool allowAutoRedirect = true, bool keepAlive = true)
Parameters
Type | Name |
---|
System.Net.HttpWebRequest | httpReq |
System.Nullable<System.Int64> | contentLength |
System.Boolean | allowAutoRedirect |
System.Boolean | keepAlive |
CloseStream(Stream)
Declaration
public virtual void CloseStream(Stream stream)
Parameters
Type | Name |
---|
System.IO.Stream | stream |
ResetStream(Stream)
Declaration
public virtual void ResetStream(Stream stream)
Parameters
Type | Name |
---|
System.IO.Stream | stream |
VerifyLicenseKeyText(String)
Declaration
public virtual LicenseKey VerifyLicenseKeyText(string licenseKeyText)
Returns
ServiceStack.LicenseKey
Parameters
Type | Name |
---|
System.String | licenseKeyText |
VerifyLicenseKeyTextFallback(String)
Declaration
public virtual LicenseKey VerifyLicenseKeyTextFallback(string licenseKeyText)
Returns
ServiceStack.LicenseKey
Parameters
Type | Name |
---|
System.String | licenseKeyText |
BeginThreadAffinity()
Declaration
public virtual void BeginThreadAffinity()
EndThreadAffinity()
Declaration
public virtual void EndThreadAffinity()
GetWeakDataContract(Type)
Declaration
public virtual DataContractAttribute GetWeakDataContract(Type type)
Returns
System.Runtime.Serialization.DataContractAttribute
Parameters
GetWeakDataMember(PropertyInfo)
Declaration
public virtual DataMemberAttribute GetWeakDataMember(PropertyInfo pi)
Returns
System.Runtime.Serialization.DataMemberAttribute
Parameters
Type | Name |
---|
System.Reflection.PropertyInfo | pi |
GetWeakDataMember(FieldInfo)
Declaration
public virtual DataMemberAttribute GetWeakDataMember(FieldInfo pi)
Returns
System.Runtime.Serialization.DataMemberAttribute
Parameters
Type | Name |
---|
System.Reflection.FieldInfo | pi |
RegisterForAot()
Declaration
public virtual void RegisterForAot()
GetStackTrace()
Declaration
public virtual string GetStackTrace()
Returns
System.String
WriteAndFlushAsync(Stream, Byte[])
Declaration
public virtual Task WriteAndFlushAsync(Stream stream, byte[] bytes)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.IO.Stream | stream |
System.Byte[] | bytes |