Skip to main content

PclExport

Assembly: ServiceStack.Text.dll
View Source
Declaration
public abstract class PclExport

Properties

Reflection

View Source
Declaration
public static ReflectionOptimizer Reflection { get; }

Fields

Instance

View Source
Declaration
public static PclExport Instance

EmptyTask

View Source
Declaration
public Task EmptyTask

DirSep

View Source
Declaration
public char DirSep

AltDirSep

View Source
Declaration
public char AltDirSep

DirSeps

View Source
Declaration
public static readonly char[] DirSeps

PlatformName

View Source
Declaration
public string PlatformName

RegexOptions

View Source
Declaration
public RegexOptions RegexOptions

InvariantComparison

View Source
Declaration
public StringComparison InvariantComparison

InvariantComparisonIgnoreCase

View Source
Declaration
public StringComparison InvariantComparisonIgnoreCase

InvariantComparer

View Source
Declaration
public StringComparer InvariantComparer

InvariantComparerIgnoreCase

View Source
Declaration
public StringComparer InvariantComparerIgnoreCase

Methods

ConfigureProvider(String)

View Source
Declaration
public static bool ConfigureProvider(string typeName)
Returns

System.Boolean

Parameters
TypeName
System.StringtypeName

Configure(PclExport)

View Source
Declaration
public static void Configure(PclExport instance)
Parameters
TypeName
ServiceStack.PclExportinstance

ReadAllText(String)

View Source
Declaration
public abstract string ReadAllText(string filePath)
Returns

System.String

Parameters
TypeName
System.StringfilePath

IsAnonymousType(Type)

View Source
Declaration
public virtual bool IsAnonymousType(Type type)
Returns

System.Boolean

Parameters
TypeName
System.Typetype

ToInvariantUpper(Char)

View Source
Declaration
public virtual string ToInvariantUpper(char value)
Returns

System.String

Parameters
TypeName
System.Charvalue

FileExists(String)

View Source
Declaration
public virtual bool FileExists(string filePath)
Returns

System.Boolean

Parameters
TypeName
System.StringfilePath

DirectoryExists(String)

View Source
Declaration
public virtual bool DirectoryExists(string dirPath)
Returns

System.Boolean

Parameters
TypeName
System.StringdirPath

CreateDirectory(String)

View Source
Declaration
public virtual void CreateDirectory(string dirPath)
Parameters
TypeName
System.StringdirPath

RegisterLicenseFromConfig()

View Source
Declaration
public virtual void RegisterLicenseFromConfig()

GetEnvironmentVariable(String)

View Source
Declaration
public virtual string GetEnvironmentVariable(string name)
Returns

System.String

Parameters
TypeName
System.Stringname

GetFileNames(String, String)

View Source
Declaration
public virtual string[] GetFileNames(string dirPath, string searchPattern = null)
Returns

System.String[]

Parameters
TypeName
System.StringdirPath
System.StringsearchPattern

GetDirectoryNames(String, String)

View Source
Declaration
public virtual string[] GetDirectoryNames(string dirPath, string searchPattern = null)
Returns

System.String[]

Parameters
TypeName
System.StringdirPath
System.StringsearchPattern

WriteLine(String)

View Source
Declaration
public virtual void WriteLine(string line)
Parameters
TypeName
System.Stringline

WriteLine(String, Object[])

View Source
Declaration
public virtual void WriteLine(string line, params object[] args)
Parameters
TypeName
System.Stringline
System.Object[]args

Config(HttpWebRequest, Nullable<Boolean>, Nullable<TimeSpan>, Nullable<TimeSpan>, String, Nullable<Boolean>)

View Source
Declaration
public virtual void Config(HttpWebRequest req, bool? allowAutoRedirect = null, TimeSpan? timeout = null, TimeSpan? readWriteTimeout = null, string userAgent = null, bool? preAuthenticate = null)
Parameters
TypeName
System.Net.HttpWebRequestreq
System.Nullable<System.Boolean>allowAutoRedirect
System.Nullable<System.TimeSpan>timeout
System.Nullable<System.TimeSpan>readWriteTimeout
System.StringuserAgent
System.Nullable<System.Boolean>preAuthenticate

AddCompression(WebRequest)

View Source
Declaration
public virtual void AddCompression(WebRequest webRequest)
Parameters
TypeName
System.Net.WebRequestwebRequest

GetRequestStream(WebRequest)

View Source
Declaration
public virtual Stream GetRequestStream(WebRequest webRequest)
Returns

System.IO.Stream

Parameters
TypeName
System.Net.WebRequestwebRequest

GetResponse(WebRequest)

View Source
Declaration
public virtual WebResponse GetResponse(WebRequest webRequest)
Returns

System.Net.WebResponse

Parameters
TypeName
System.Net.WebRequestwebRequest

GetResponseAsync(WebRequest)

View Source
Declaration
public virtual Task<WebResponse> GetResponseAsync(WebRequest webRequest)
Returns

System.Threading.Tasks.Task<System.Net.WebResponse>

Parameters
TypeName
System.Net.WebRequestwebRequest

IsDebugBuild(Assembly)

View Source
Declaration
public virtual bool IsDebugBuild(Assembly assembly)
Returns

System.Boolean

Parameters
TypeName
System.Reflection.Assemblyassembly

MapAbsolutePath(String, String)

View Source
Declaration
public virtual string MapAbsolutePath(string relativePath, string appendPartialPathModifier)
Returns

System.String

Parameters
TypeName
System.StringrelativePath
System.StringappendPartialPathModifier

LoadAssembly(String)

View Source
Declaration
public virtual Assembly LoadAssembly(string assemblyPath)
Returns

System.Reflection.Assembly

Parameters
TypeName
System.StringassemblyPath

AddHeader(WebRequest, String, String)

View Source
Declaration
public virtual void AddHeader(WebRequest webReq, string name, string value)
Parameters
TypeName
System.Net.WebRequestwebReq
System.Stringname
System.Stringvalue

SetUserAgent(HttpWebRequest, String)

View Source
Declaration
public virtual void SetUserAgent(HttpWebRequest httpReq, string value)
Parameters
TypeName
System.Net.HttpWebRequesthttpReq
System.Stringvalue

SetContentLength(HttpWebRequest, Int64)

View Source
Declaration
public virtual void SetContentLength(HttpWebRequest httpReq, long value)
Parameters
TypeName
System.Net.HttpWebRequesthttpReq
System.Int64value

SetAllowAutoRedirect(HttpWebRequest, Boolean)

View Source
Declaration
public virtual void SetAllowAutoRedirect(HttpWebRequest httpReq, bool value)
Parameters
TypeName
System.Net.HttpWebRequesthttpReq
System.Booleanvalue

SetKeepAlive(HttpWebRequest, Boolean)

View Source
Declaration
public virtual void SetKeepAlive(HttpWebRequest httpReq, bool value)
Parameters
TypeName
System.Net.HttpWebRequesthttpReq
System.Booleanvalue

GetAllAssemblies()

View Source
Declaration
public virtual Assembly[] GetAllAssemblies()
Returns

System.Reflection.Assembly[]

FindType(String, String)

View Source
Declaration
public virtual Type FindType(string typeName, string assemblyName)
Returns

System.Type

Parameters
TypeName
System.StringtypeName
System.StringassemblyName

GetAssemblyCodeBase(Assembly)

View Source
Declaration
public virtual string GetAssemblyCodeBase(Assembly assembly)
Returns

System.String

Parameters
TypeName
System.Reflection.Assemblyassembly

GetAssemblyPath(Type)

View Source
Declaration
public virtual string GetAssemblyPath(Type source)
Returns

System.String

Parameters
TypeName
System.Typesource

GetAsciiString(Byte[])

View Source
Declaration
public virtual string GetAsciiString(byte[] bytes)
Returns

System.String

Parameters
TypeName
System.Byte[]bytes

GetAsciiString(Byte[], Int32, Int32)

View Source
Declaration
public virtual string GetAsciiString(byte[] bytes, int index, int count)
Returns

System.String

Parameters
TypeName
System.Byte[]bytes
System.Int32index
System.Int32count

GetAsciiBytes(String)

View Source
Declaration
public virtual byte[] GetAsciiBytes(string str)
Returns

System.Byte[]

Parameters
TypeName
System.Stringstr

GetUTF8Encoding(Boolean)

View Source
Declaration
public virtual Encoding GetUTF8Encoding(bool emitBom = false)
Returns

System.Text.Encoding

Parameters
TypeName
System.BooleanemitBom

CreateGetter(PropertyInfo)

View Source
Declaration
[Obsolete("ReflectionOptimizer.CreateGetter")]
public GetMemberDelegate CreateGetter(PropertyInfo propertyInfo)
Returns

ServiceStack.GetMemberDelegate

Parameters
TypeName
System.Reflection.PropertyInfopropertyInfo

CreateGetter<T>(PropertyInfo)

View Source
Declaration
[Obsolete("ReflectionOptimizer.CreateGetter")]
public GetMemberDelegate<T> CreateGetter<T>(PropertyInfo propertyInfo)
Returns

ServiceStack.GetMemberDelegate<T>

Parameters
TypeName
System.Reflection.PropertyInfopropertyInfo
Type Parameters
  • T

CreateSetter(PropertyInfo)

View Source
Declaration
[Obsolete("ReflectionOptimizer.CreateSetter")]
public SetMemberDelegate CreateSetter(PropertyInfo propertyInfo)
Returns

ServiceStack.SetMemberDelegate

Parameters
TypeName
System.Reflection.PropertyInfopropertyInfo

CreateSetter<T>(PropertyInfo)

View Source
Declaration
[Obsolete("ReflectionOptimizer.CreateSetter")]
public SetMemberDelegate<T> CreateSetter<T>(PropertyInfo propertyInfo)
Returns

ServiceStack.SetMemberDelegate<T>

Parameters
TypeName
System.Reflection.PropertyInfopropertyInfo
Type Parameters
  • T

CreateGetter(FieldInfo)

View Source
Declaration
[Obsolete("ReflectionOptimizer.CreateGetter")]
public virtual GetMemberDelegate CreateGetter(FieldInfo fieldInfo)
Returns

ServiceStack.GetMemberDelegate

Parameters
TypeName
System.Reflection.FieldInfofieldInfo

CreateGetter<T>(FieldInfo)

View Source
Declaration
[Obsolete("ReflectionOptimizer.CreateGetter")]
public virtual GetMemberDelegate<T> CreateGetter<T>(FieldInfo fieldInfo)
Returns

ServiceStack.GetMemberDelegate<T>

Parameters
TypeName
System.Reflection.FieldInfofieldInfo
Type Parameters
  • T

CreateSetter(FieldInfo)

View Source
Declaration
[Obsolete("ReflectionOptimizer.CreateSetter")]
public virtual SetMemberDelegate CreateSetter(FieldInfo fieldInfo)
Returns

ServiceStack.SetMemberDelegate

Parameters
TypeName
System.Reflection.FieldInfofieldInfo

CreateSetter<T>(FieldInfo)

View Source
Declaration
[Obsolete("ReflectionOptimizer.CreateSetter")]
public virtual SetMemberDelegate<T> CreateSetter<T>(FieldInfo fieldInfo)
Returns

ServiceStack.SetMemberDelegate<T>

Parameters
TypeName
System.Reflection.FieldInfofieldInfo
Type Parameters
  • T

InSameAssembly(Type, Type)

View Source
Declaration
public virtual bool InSameAssembly(Type t1, Type t2)
Returns

System.Boolean

Parameters
TypeName
System.Typet1
System.Typet2

GetGenericCollectionType(Type)

View Source
Declaration
public virtual Type GetGenericCollectionType(Type type)
Returns

System.Type

Parameters
TypeName
System.Typetype

ToXsdDateTimeString(DateTime)

View Source
Declaration
public virtual string ToXsdDateTimeString(DateTime dateTime)
Returns

System.String

Parameters
TypeName
System.DateTimedateTime

ToLocalXsdDateTimeString(DateTime)

View Source
Declaration
public virtual string ToLocalXsdDateTimeString(DateTime dateTime)
Returns

System.String

Parameters
TypeName
System.DateTimedateTime

ParseXsdDateTime(String)

View Source
Declaration
public virtual DateTime ParseXsdDateTime(string dateTimeStr)
Returns

System.DateTime

Parameters
TypeName
System.StringdateTimeStr

ParseXsdDateTimeAsUtc(String)

View Source
Declaration
public virtual DateTime ParseXsdDateTimeAsUtc(string dateTimeStr)
Returns

System.DateTime

Parameters
TypeName
System.StringdateTimeStr

ToStableUniversalTime(DateTime)

View Source
Declaration
public virtual DateTime ToStableUniversalTime(DateTime dateTime)
Returns

System.DateTime

Parameters
TypeName
System.DateTimedateTime

GetDictionaryParseMethod<TSerializer>(Type)

View Source
Declaration
public virtual ParseStringDelegate GetDictionaryParseMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns

ServiceStack.Text.Common.ParseStringDelegate

Parameters
TypeName
System.Typetype
Type Parameters
  • TSerializer

GetDictionaryParseStringSpanMethod<TSerializer>(Type)

View Source
Declaration
public virtual ParseStringSpanDelegate GetDictionaryParseStringSpanMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns

ServiceStack.Text.Common.ParseStringSpanDelegate

Parameters
TypeName
System.Typetype
Type Parameters
  • TSerializer

GetSpecializedCollectionParseMethod<TSerializer>(Type)

View Source
Declaration
public virtual ParseStringDelegate GetSpecializedCollectionParseMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns

ServiceStack.Text.Common.ParseStringDelegate

Parameters
TypeName
System.Typetype
Type Parameters
  • TSerializer

GetSpecializedCollectionParseStringSpanMethod<TSerializer>(Type)

View Source
Declaration
public virtual ParseStringSpanDelegate GetSpecializedCollectionParseStringSpanMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns

ServiceStack.Text.Common.ParseStringSpanDelegate

Parameters
TypeName
System.Typetype
Type Parameters
  • TSerializer

GetJsReaderParseMethod<TSerializer>(Type)

View Source
Declaration
public virtual ParseStringDelegate GetJsReaderParseMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns

ServiceStack.Text.Common.ParseStringDelegate

Parameters
TypeName
System.Typetype
Type Parameters
  • TSerializer

GetJsReaderParseStringSpanMethod<TSerializer>(Type)

View Source
Declaration
public virtual ParseStringSpanDelegate GetJsReaderParseStringSpanMethod<TSerializer>(Type type)
where TSerializer : ITypeSerializer
Returns

ServiceStack.Text.Common.ParseStringSpanDelegate

Parameters
TypeName
System.Typetype
Type Parameters
  • TSerializer

InitHttpWebRequest(HttpWebRequest, Nullable<Int64>, Boolean, Boolean)

View Source
Declaration
public virtual void InitHttpWebRequest(HttpWebRequest httpReq, long? contentLength = null, bool allowAutoRedirect = true, bool keepAlive = true)
Parameters
TypeName
System.Net.HttpWebRequesthttpReq
System.Nullable<System.Int64>contentLength
System.BooleanallowAutoRedirect
System.BooleankeepAlive

CloseStream(Stream)

View Source
Declaration
public virtual void CloseStream(Stream stream)
Parameters
TypeName
System.IO.Streamstream

ResetStream(Stream)

View Source
Declaration
public virtual void ResetStream(Stream stream)
Parameters
TypeName
System.IO.Streamstream

VerifyLicenseKeyText(String)

View Source
Declaration
public virtual LicenseKey VerifyLicenseKeyText(string licenseKeyText)
Returns

ServiceStack.LicenseKey

Parameters
TypeName
System.StringlicenseKeyText

VerifyLicenseKeyTextFallback(String)

View Source
Declaration
public virtual LicenseKey VerifyLicenseKeyTextFallback(string licenseKeyText)
Returns

ServiceStack.LicenseKey

Parameters
TypeName
System.StringlicenseKeyText

BeginThreadAffinity()

View Source
Declaration
public virtual void BeginThreadAffinity()

EndThreadAffinity()

View Source
Declaration
public virtual void EndThreadAffinity()

GetWeakDataContract(Type)

View Source
Declaration
public virtual DataContractAttribute GetWeakDataContract(Type type)
Returns

System.Runtime.Serialization.DataContractAttribute

Parameters
TypeName
System.Typetype

GetWeakDataMember(PropertyInfo)

View Source
Declaration
public virtual DataMemberAttribute GetWeakDataMember(PropertyInfo pi)
Returns

System.Runtime.Serialization.DataMemberAttribute

Parameters
TypeName
System.Reflection.PropertyInfopi

GetWeakDataMember(FieldInfo)

View Source
Declaration
public virtual DataMemberAttribute GetWeakDataMember(FieldInfo pi)
Returns

System.Runtime.Serialization.DataMemberAttribute

Parameters
TypeName
System.Reflection.FieldInfopi

RegisterForAot()

View Source
Declaration
public virtual void RegisterForAot()

GetStackTrace()

View Source
Declaration
public virtual string GetStackTrace()
Returns

System.String

WriteAndFlushAsync(Stream, Byte[])

View Source
Declaration
public virtual Task WriteAndFlushAsync(Stream stream, byte[] bytes)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.IO.Streamstream
System.Byte[]bytes