commit 10489df35c5a6ec74908902cbc0a40cae67123e3 Author: moosecrab Date: Mon Feb 24 22:32:38 2020 -0800 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..170a2ca --- /dev/null +++ b/.gitignore @@ -0,0 +1,355 @@ + +# Created by https://www.gitignore.io/api/visualstudio +# Edit at https://www.gitignore.io/?templates=visualstudio + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# End of https://www.gitignore.io/api/visualstudio diff --git a/AutoUpdater/AutoUpdater.vbproj b/AutoUpdater/AutoUpdater.vbproj new file mode 100755 index 0000000..8b8117a --- /dev/null +++ b/AutoUpdater/AutoUpdater.vbproj @@ -0,0 +1,141 @@ + + + + Debug + x86 + + + + + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB} + Exe + AutoUpdater.Module1 + AutoUpdater + AutoUpdater + 512 + Console + v4.0 + + + + + x86 + true + full + true + true + bin\Debug\ + AutoUpdater.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + x86 + pdbonly + false + true + true + bin\Release\ + AutoUpdater.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + true + true + true + bin\Debug\ + AutoUpdater.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + full + AnyCPU + true + true + + + false + bin\Release\ + AutoUpdater.xml + true + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + None + AnyCPU + false + false + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + \ No newline at end of file diff --git a/AutoUpdater/Module1.vb b/AutoUpdater/Module1.vb new file mode 100755 index 0000000..1d93461 --- /dev/null +++ b/AutoUpdater/Module1.vb @@ -0,0 +1,92 @@ +Module Module1 + Dim sw As New System.Diagnostics.Stopwatch + Sub Main() + 'autoupdater oldfile downloadpath + Console.BackgroundColor = ConsoleColor.Black + Console.Title = "Autoupdater" + sw.Start() + Try + 'log(Environment.CommandLine) + If My.Application.CommandLineArgs.Count <> 2 Then + log("Incorrect number of arguments used, closing") + Exit Sub + End If + + log("Opening temp file for download") + Dim tempfile As String = FileIO.FileSystem.GetTempFileName() + log("Temp file: " & tempfile) + + Dim dlstring, oldfile As String + oldfile = My.Application.CommandLineArgs(0) + dlstring = My.Application.CommandLineArgs(1) + + If FileIO.FileSystem.FileExists(oldfile) Then + oldfile = FileIO.FileSystem.GetFileInfo(oldfile).FullName + log("Old file: " & oldfile) + Else + Throw New Exception("Couldn't find old file") + End If + + Dim processList() As Process + Dim runningproc As Process = Nothing + processList = Process.GetProcesses + For Each x In processList + Try + If x.MainModule.FileName = oldfile Then + log("Old process still running. PID " & x.Id.ToString) + runningproc = x + log("Waiting 5s for process to exit...") + runningproc.WaitForExit(5000) + + If Not runningproc.HasExited Then + log("Process still running, attempting to kill gracefully") + runningproc.CloseMainWindow() + runningproc.WaitForExit(5000) + + If Not runningproc.HasExited Then + log("Process still running, forcefully terminating") + runningproc.Kill() + runningproc.WaitForExit(1000) + + If Not runningproc.HasExited Then + Throw New Exception("Could not terminate the process") + End If + + End If + + End If + log("Process exited") + runningproc.Close() + Exit For + End If + Catch + End Try + Next + + log("Downloading from " & dlstring) + Dim wc As New Net.WebClient + wc.DownloadFile(dlstring, tempfile) + log("New file downloaded, writing over old file") + FileIO.FileSystem.WriteAllBytes(oldfile, FileIO.FileSystem.ReadAllBytes(tempfile), False) + log("New file written, deleting old file") + FileIO.FileSystem.DeleteFile(tempfile) + log("Success! Starting new file") + System.Diagnostics.Process.Start(oldfile, "-delupdater""" & Process.GetCurrentProcess.MainModule.FileName & """") + Catch ex As Exception + Console.BackgroundColor = ConsoleColor.Red + log(ex.ToString) + Console.ReadLine() + Exit Sub + End Try + End Sub + + Public Sub log(msg As String) + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("[") + Console.ForegroundColor = ConsoleColor.White + Console.Write("{0,6:0.000}", sw.Elapsed.TotalSeconds) + Console.ForegroundColor = ConsoleColor.Gray + Console.WriteLine("] " & msg) + End Sub + +End Module diff --git a/AutoUpdater/My Project/Application.Designer.vb b/AutoUpdater/My Project/Application.Designer.vb new file mode 100755 index 0000000..2d2f4a0 --- /dev/null +++ b/AutoUpdater/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.296 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/AutoUpdater/My Project/Application.myapp b/AutoUpdater/My Project/Application.myapp new file mode 100755 index 0000000..23b627f --- /dev/null +++ b/AutoUpdater/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 2 + true + diff --git a/AutoUpdater/My Project/AssemblyInfo.vb b/AutoUpdater/My Project/AssemblyInfo.vb new file mode 100755 index 0000000..252cfb8 --- /dev/null +++ b/AutoUpdater/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' + + + diff --git a/AutoUpdater/My Project/Resources.Designer.vb b/AutoUpdater/My Project/Resources.Designer.vb new file mode 100755 index 0000000..99c74ee --- /dev/null +++ b/AutoUpdater/My Project/Resources.Designer.vb @@ -0,0 +1,63 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.296 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("AutoUpdater.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/AutoUpdater/My Project/Resources.resx b/AutoUpdater/My Project/Resources.resx new file mode 100755 index 0000000..ffecec8 --- /dev/null +++ b/AutoUpdater/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/AutoUpdater/My Project/Settings.Designer.vb b/AutoUpdater/My Project/Settings.Designer.vb new file mode 100755 index 0000000..c6b3995 --- /dev/null +++ b/AutoUpdater/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.296 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.AutoUpdater.My.MySettings + Get + Return Global.AutoUpdater.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/AutoUpdater/My Project/Settings.settings b/AutoUpdater/My Project/Settings.settings new file mode 100755 index 0000000..377f56d --- /dev/null +++ b/AutoUpdater/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/AutoUpdater/app.config b/AutoUpdater/app.config new file mode 100755 index 0000000..457ec03 --- /dev/null +++ b/AutoUpdater/app.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PepperBet.sln b/PepperBet.sln new file mode 100755 index 0000000..da7b6fd --- /dev/null +++ b/PepperBet.sln @@ -0,0 +1,34 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PepperBet", "PepperBet\PepperBet.vbproj", "{F88AA82A-320E-4A3B-87A3-C07BFC6F3450}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "AutoUpdater", "AutoUpdater\AutoUpdater.vbproj", "{1E99431F-65AD-4CFD-9A8A-264CED54DAEB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F88AA82A-320E-4A3B-87A3-C07BFC6F3450}.Debug|Any CPU.ActiveCfg = Debug|x86 + {F88AA82A-320E-4A3B-87A3-C07BFC6F3450}.Debug|x86.ActiveCfg = Debug|x86 + {F88AA82A-320E-4A3B-87A3-C07BFC6F3450}.Debug|x86.Build.0 = Debug|x86 + {F88AA82A-320E-4A3B-87A3-C07BFC6F3450}.Release|Any CPU.ActiveCfg = Release|x86 + {F88AA82A-320E-4A3B-87A3-C07BFC6F3450}.Release|x86.ActiveCfg = Release|x86 + {F88AA82A-320E-4A3B-87A3-C07BFC6F3450}.Release|x86.Build.0 = Release|x86 + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB}.Debug|x86.ActiveCfg = Debug|x86 + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB}.Debug|x86.Build.0 = Debug|x86 + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB}.Release|Any CPU.Build.0 = Release|Any CPU + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB}.Release|x86.ActiveCfg = Release|x86 + {1E99431F-65AD-4CFD-9A8A-264CED54DAEB}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PepperBet/My Project/Application.Designer.vb b/PepperBet/My Project/Application.Designer.vb new file mode 100755 index 0000000..cdf76c6 --- /dev/null +++ b/PepperBet/My Project/Application.Designer.vb @@ -0,0 +1,13 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.1008 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + diff --git a/PepperBet/My Project/Application.myapp b/PepperBet/My Project/Application.myapp new file mode 100755 index 0000000..23b627f --- /dev/null +++ b/PepperBet/My Project/Application.myapp @@ -0,0 +1,10 @@ + + + false + false + 0 + true + 0 + 2 + true + diff --git a/PepperBet/My Project/AssemblyInfo.vb b/PepperBet/My Project/AssemblyInfo.vb new file mode 100755 index 0000000..1cb48ce --- /dev/null +++ b/PepperBet/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' General Information about an assembly is controlled through the following +' set of attributes. Change these attribute values to modify the information +' associated with an assembly. + +' Review the values of the assembly attributes + + + + + + + + + + +'The following GUID is for the ID of the typelib if this project is exposed to COM + + +' Version information for an assembly consists of the following four values: +' +' Major Version +' Minor Version +' Build Number +' Revision +' +' You can specify all the values or you can default the Build and Revision Numbers +' by using the '*' as shown below: +' + + + diff --git a/PepperBet/My Project/Resources.Designer.vb b/PepperBet/My Project/Resources.Designer.vb new file mode 100755 index 0000000..ecd83c1 --- /dev/null +++ b/PepperBet/My Project/Resources.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.18444 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("PepperBet.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + + ''' + ''' Looks up a localized resource of type System.Byte[]. + ''' + Friend ReadOnly Property AutoUpdater() As Byte() + Get + Dim obj As Object = ResourceManager.GetObject("AutoUpdater", resourceCulture) + Return CType(obj,Byte()) + End Get + End Property + End Module +End Namespace diff --git a/PepperBet/My Project/Resources.resx b/PepperBet/My Project/Resources.resx new file mode 100755 index 0000000..2b796a7 --- /dev/null +++ b/PepperBet/My Project/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\AutoUpdater.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PepperBet/My Project/Settings.Designer.vb b/PepperBet/My Project/Settings.Designer.vb new file mode 100755 index 0000000..354eb91 --- /dev/null +++ b/PepperBet/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.18444 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.PepperBet.My.MySettings + Get + Return Global.PepperBet.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/PepperBet/My Project/Settings.settings b/PepperBet/My Project/Settings.settings new file mode 100755 index 0000000..52336a2 --- /dev/null +++ b/PepperBet/My Project/Settings.settings @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/PepperBet/PepperBet.vb b/PepperBet/PepperBet.vb new file mode 100755 index 0000000..03ad5f4 --- /dev/null +++ b/PepperBet/PepperBet.vb @@ -0,0 +1,1254 @@ +Module Pepperbet + + 'This constant defines how RD increases over time, higher=faster + Const c = 0.6 + 'Minimum RD (to ensure liquidity) + Const RDmin = 30 + 'Defined as part of the Glicko system + Const q = 0.005756462732485 + 'Seconds between updates + Const updatedelay = 2 + 'Upset RD maximum increase factor (infinite matches, as a fraction of RD) + Const u = 0.5 + 'Upset RD increase fluke-factor, more matches creates less chance of a fluke + Const f = 0.5 + 'Upset RD exponent, steepens modification curve with confidence + Const e = 1.5 + Const version As String = "1.9.12" + Const downloadurl As String = "https://long-cat.net/projects/pepperbet/pepperbet.exe?v=" & version + Const versionurl As String = "https://long-cat.net/projects/pepperbet/version.txt?v=" & version + Dim TheList As New List(Of Glicko) + Dim match As Long = 0 + Dim names As New List(Of String) + Dim watching As Boolean = True + Dim autoupdate As Boolean = False + Dim lastupdatecheck As New DateTime(0) + Enum ModeTypes + Matchmaking + Tournament + Exhibitions + End Enum + Dim Mode As ModeTypes + + Sub Main() + 'test case in case you modify the glicko functions + 'THIS TEST MAY NO LONGER WORK WITH MY MODIFICATIONS TO RD IN THE CASE OF UPSETS + 'Dim testman As New Glicko("testman", 0) + 'testman.K = 1500 + 'testman.RD = 200 + 'Dim opp1 As New Glicko("1", 0) + 'opp1.K = 1400 + 'opp1.RD = 30 + 'Dim opp2 As New Glicko("2", 0) + 'opp2.K = 1550 + 'opp2.RD = 100 + 'Dim opp3 As New Glicko("3", 0) + 'opp3.K = 1700 + 'opp3.RD = 300 + + 'testman.Update({opp1, opp2, opp3}, {1, 0, 0}, 0) + 'testmans K should be 1464 and RD should be 151.4 + + + Try + + Dim xdoc As New Xml.XmlDocument + xdoc = Nothing + Dim wc As New System.Net.WebClient + Dim p1 As Glicko = Nothing + Dim p1name As String + Dim p2 As Glicko = Nothing + Dim p2name As String + Dim tempindex As Integer + Dim state As String + Dim manualmode As Boolean = False + Dim tempkey As ConsoleKeyInfo + Dim bootstrap As Boolean = True + Dim blankline As String = " " + Dim lastupdate As Date + Dim skippingmatch As Boolean = False + Dim alertstr As String = "" + Dim remainingstr As String = "" + + Try + If Environment.GetCommandLineArgs.Count > 1 Then + For Each x In Environment.GetCommandLineArgs + If x.StartsWith("-delupdater") Then + Thread.Sleep(250) + FileIO.FileSystem.DeleteFile(x.Substring(11)) + End If + Next + End If + Catch + End Try + + Console.WindowWidth = 80 + Console.BufferHeight = 420 + Console.Title = "PepperBet" + Console.BackgroundColor = ConsoleColor.Black + Console.ForegroundColor = ConsoleColor.White + Console.WriteLine(" ╔════════════════╗") + Console.Write("──────────────────────────────╢ ") + Console.ForegroundColor = ConsoleColor.Red + Console.Write("Pepper ") + Console.ForegroundColor = ConsoleColor.Cyan + Console.Write("Bet") + Console.ForegroundColor = ConsoleColor.White + Console.WriteLine(" ╟──────────────────────────────") + 'DONT FORGET TO CHANGE IT UP IN THE CONST + Console.WriteLine("──────────────────────────────╢ v" & version & " ╟──────────────────────────────") + 'DONT FORGET TO CHANGE IT UP IN THE CONST + Console.WriteLine(" ╚════════════════╝") + Console.WriteLine() + Console.ForegroundColor = ConsoleColor.Gray + Console.WriteLine("(C) 2013-2018 by moose crap http://long-cat.net") + Console.WriteLine("Thanks to Fredstonemason for help and testing") + Console.WriteLine() + helpstring() + 'Console.WriteLine("[T]ier") + Console.WriteLine() + Load() + If autoupdate Then + CheckForUpdates() + End If + Console.WriteLine("{0} fighters loaded from data.xml.", TheList.Count) + If names.Count > 0 Then + Console.Write("Watching: ") + For Each x In names + Console.Write(x & ", ") + Next + Console.WriteLine() + End If + + + While xdoc Is Nothing + Try + xdoc = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(wc.DownloadString("http://www.saltybet.com/state.json"), "saltybet") + Catch ex As Exception + xdoc = Nothing + System.Threading.Thread.Sleep(1500) + End Try + End While + + state = "nigga" + + While True 'main loop + lastupdate = Date.UtcNow + + If Not bootstrap Then 'dont reload state.json if we're in bootstrap mode + Try + xdoc = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(wc.DownloadString("http://www.saltybet.com/state.json"), "saltybet") + Catch ex As Exception + xdoc = Nothing + End Try + End If + + If Not xdoc Is Nothing AndAlso + xdoc.SelectSingleNode("saltybet/status").InnerText <> state Then + + alertstr = xdoc.SelectSingleNode("saltybet/alert").InnerText + remainingstr = xdoc.SelectSingleNode("saltybet/remaining").InnerText + UpdateTitle(manualmode, alertstr, remainingstr) + + If bootstrap = True Then 'advance states as we rotate through in bootstrap mode + Select Case state + Case "nigga" + state = "open" + Case "open" + state = "locked" + Case Else + state = xdoc.SelectSingleNode("saltybet/status").InnerText + End Select + If xdoc.SelectSingleNode("saltybet/status").InnerText = state Then + bootstrap = False + End If + Else + state = xdoc.SelectSingleNode("saltybet/status").InnerText + End If + + Select Case state + Case "open" + If autoupdate Then + CheckForUpdates() + End If + + If remainingstr.Contains("exhibition match") Then + Mode = ModeTypes.Exhibitions + ElseIf remainingstr.Contains("FINAL ROUND") Or remainingstr.Contains("bracket") Then + Mode = ModeTypes.Tournament + Else + Mode = ModeTypes.Matchmaking + End If + + match += 1 + skippingmatch = False + p1name = xdoc.SelectSingleNode("saltybet/p1name").InnerText + p2name = xdoc.SelectSingleNode("saltybet/p2name").InnerText + tempindex = TheList.FindIndex(Function(a) a.Name = p1name) + + If Mode = ModeTypes.Exhibitions Then + skippingmatch = True + End If + + If tempindex = -1 Then 'p1 never seen before + p1 = New Glicko(p1name, match) + If Not skippingmatch Then + TheList.Add(p1) + End If + Else + p1 = TheList(tempindex) + End If + + tempindex = TheList.FindIndex(Function(a) a.Name = p2name) + If tempindex = -1 Then 'p2 never seen before + p2 = New Glicko(p2name, match) + If Not skippingmatch Then + TheList.Add(p2) + End If + Else + p2 = TheList(tempindex) + End If + + + If skippingmatch And (TheList.Contains(p1) And TheList.Contains(p2)) Then + DoMatchup(p1, p2, False, True) + ElseIf skippingmatch Then + Console.WriteLine() + If TheList.Contains(p1) Then + Console.ForegroundColor = ConsoleColor.Gray + Console.BackgroundColor = ConsoleColor.Black + Console.Write("[{0,4:####}]", p1.K) + Console.Write(" {0,-3:###} ", p1.RD) + Console.ForegroundColor = ConsoleColor.Red + 'Console.Write("{0,26}", TrimString(If(p1.LastMatch = match, "(N) ", "") + If((p1.Tier <> p2.Tier) And (p1.Tier <> Glicko.Tiers.Unknown) And (p2.Tier <> Glicko.Tiers.Unknown), "(" + p1.TierLetter + ") ", "") + p1.Name, 26)) + Console.Write("{0,26}", TrimString(p1.Name, 26)) + Else + Console.ForegroundColor = ConsoleColor.Red + Console.BackgroundColor = ConsoleColor.Black + Console.Write("{0,37}", TrimString(p1.Name, 37)) + End If + + Console.ForegroundColor = ConsoleColor.Gray + Console.Write(" vs ") + Console.ForegroundColor = ConsoleColor.Cyan + Console.BackgroundColor = ConsoleColor.Black + If TheList.Contains(p2) Then + + 'Console.Write("{0,-26}", TrimString(If(p2.LastMatch = match, "(N) ", "") + If((p1.Tier <> p2.Tier) And (p1.Tier <> Glicko.Tiers.Unknown) And (p2.Tier <> Glicko.Tiers.Unknown), "(" + p2.TierLetter + ") ", "") + p2.Name, 26)) + Console.Write("{0,-26}", TrimString(p2.Name, 26)) + Console.BackgroundColor = ConsoleColor.Black + Console.ForegroundColor = ConsoleColor.Gray + Console.Write(" [{0,4:####}]", p2.K) + Console.Write(" {0,-3:###} " + vbNewLine, p2.RD) + Else + Console.WriteLine("{0,-37}", TrimString(p2.Name, 37)) + End If + Else + + DoMatchup(p1, p2, False) + End If + + + 'Glicko.UpdateTiers(p1, p2) + + Case "locked" + If xdoc.SelectSingleNode("saltybet/p1name").InnerText <> p1.Name Or + xdoc.SelectSingleNode("saltybet/p2name").InnerText <> p2.Name Then + state = "nigga" + bootstrap = True + Exit Select + End If + Dim p1t As Long = xdoc.SelectSingleNode("saltybet/p1total").InnerText.Replace(",", "") + Dim p2t As Long = xdoc.SelectSingleNode("saltybet/p2total").InnerText.Replace(",", "") + Dim ratiostring As String + + Console.ForegroundColor = ConsoleColor.Red + Console.Write("{0,34} ", "$" + xdoc.SelectSingleNode("saltybet/p1total").InnerText) + If p1t > p2t Then + Console.ForegroundColor = ConsoleColor.Red + ratiostring = (p1t / p2t).ToString("0.0") + ":1" + Else + Console.ForegroundColor = ConsoleColor.Cyan + ratiostring = "1:" + (p2t / p1t).ToString("0.0") + End If + Console.Write("{0,-8}", ratiostring) + Console.ForegroundColor = ConsoleColor.Cyan + Console.Write("{0,-34} " + vbCrLf, "$" + xdoc.SelectSingleNode("saltybet/p2total").InnerText) + If watching = False Or names.Count = 0 Then + Exit Select + End If + Dim zdata As New Xml.XmlDocument + Try + zdata = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(wc.DownloadString("http://www.saltybet.com/zdata.json").ToLowerInvariant, "saltybet") + Catch + End Try + If Not zdata Is Nothing Then + For Each x In names + Dim didbet As Boolean = False + Dim bank As Long + Dim wager As Long + Dim player As Integer + If watching And names.Count <> 0 Then + Dim playerelement As Xml.XmlElement = zdata.SelectSingleNode("saltybet/*/n[.=""" & x.ToLowerInvariant & """]") + If Not playerelement Is Nothing Then + playerelement = playerelement.ParentNode + bank = CLng(playerelement.SelectSingleNode("b").InnerText) + wager = CLng(playerelement.SelectSingleNode("w").InnerText) + player = CInt(playerelement.SelectSingleNode("p").InnerText) + didbet = True + End If + End If + If didbet Then + Console.ForegroundColor = ConsoleColor.Gray + If player = 1 Then + Console.WriteLine("{0,-78}", x & ": " & bank.ToString("$#,#") & " [" & wager.ToString("$#,#") & " " & (wager / bank).ToString("#0.0%") & "] " & Math.Ceiling(wager * (p2t / p1t)).ToString("+$#,#")) + Else + Console.WriteLine("{0,78}", x & ": " & bank.ToString("$#,#") & " [" & wager.ToString("$#,#") & " " & (wager / bank).ToString("#0.0%") & "] " & Math.Ceiling(wager * (p1t / p2t)).ToString("+$#,#")) + + End If + End If + Next + End If + Case "1" + If xdoc.SelectSingleNode("saltybet/p1name").InnerText <> p1.Name Or + xdoc.SelectSingleNode("saltybet/p2name").InnerText <> p2.Name Then + state = "nigga" + bootstrap = True + Exit Select + End If + If skippingmatch Then + Console.ForegroundColor = ConsoleColor.Red + Console.BackgroundColor = ConsoleColor.Black + Console.WriteLine(" <-------") + Exit Select + End If + If manualmode = True Then + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("Enter match scores: ") + Dim scorestr As String = Console.ReadLine + Console.CursorTop -= 1 + DoResults(p1, p2, True, False, scorestr) + manualmode = False + UpdateTitle(manualmode, alertstr, remainingstr) + Else + DoResults(p1, p2, True, False) + End If + + Save() + + Case "2" + If xdoc.SelectSingleNode("saltybet/p1name").InnerText <> p1.Name Or + xdoc.SelectSingleNode("saltybet/p2name").InnerText <> p2.Name Then + state = "nigga" + bootstrap = True + Exit Select + End If + If skippingmatch Then + Console.ForegroundColor = ConsoleColor.Cyan + Console.BackgroundColor = ConsoleColor.Black + Console.WriteLine(" ------->") + Exit Select + End If + If manualmode = True Then + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("Enter match scores: ") + Dim scorestr As String = Console.ReadLine + Console.CursorTop -= 1 + DoResults(p1, p2, False, False, scorestr) + manualmode = False + UpdateTitle(manualmode, alertstr, remainingstr) + Else + DoResults(p1, p2, False, False) + End If + + Save() + + End Select + End If + + While Not bootstrap And (Date.UtcNow - lastupdate).TotalSeconds < updatedelay + tempkey = Nothing + While Console.KeyAvailable + tempkey = Console.ReadKey(True) + End While + + If tempkey.Key = ConsoleKey.Enter Then + If Not skippingmatch Then + manualmode = True + UpdateTitle(manualmode, alertstr, remainingstr) + End If + 'Console.ForegroundColor = ConsoleColor.Gray + 'Console.BackgroundColor = ConsoleColor.Black + 'Console.WriteLine("Manual input engaged") + + ElseIf tempkey.Key = ConsoleKey.Escape Then + manualmode = False + UpdateTitle(manualmode, alertstr, remainingstr) + + ElseIf tempkey.Key = ConsoleKey.H OrElse tempkey.Key = ConsoleKey.Oem2 Then + Console.ForegroundColor = ConsoleColor.Gray + helpstring() + + ElseIf tempkey.Key = ConsoleKey.N Then + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("Saltybet usernames: ") + For Each x In names + System.Windows.Forms.SendKeys.SendWait(x & ",") + Next + names.Clear() + Dim namestr As String = Console.ReadLine + For Each x In namestr.Split(",".ToCharArray) + If x <> String.Empty Then + names.Add(x.Trim(" ".ToCharArray)) + End If + Next + Console.CursorTop -= 1 + Console.Write(blankline) + Console.CursorLeft = 0 + Save() + + ElseIf tempkey.Key = ConsoleKey.W Then + watching = Not watching + Console.ForegroundColor = ConsoleColor.Gray + Console.WriteLine(blankline) + Console.CursorTop -= 1 + Console.CursorLeft = 0 + If watching Then + Console.Write("Bet display enabled") + Else + Console.Write("Bet display disabled") + End If + Console.CursorLeft = 0 + + ElseIf tempkey.Key = ConsoleKey.F Then + Console.ForegroundColor = ConsoleColor.Gray + Console.WriteLine(blankline) + Console.CursorTop -= 1 + Console.CursorLeft = 0 + Console.Write("Checking for updates...") + Console.CursorLeft = 0 + CheckForUpdates(True) + ElseIf tempkey.Key = ConsoleKey.A Then + autoupdate = Not autoupdate + Console.ForegroundColor = ConsoleColor.Gray + Console.WriteLine(blankline) + Console.CursorTop -= 1 + Console.CursorLeft = 0 + If autoupdate Then + Console.Write("Automatic updates enabled") + Else + Console.Write("Automatic updates disabled") + End If + Console.CursorLeft = 0 + ElseIf tempkey.Key = ConsoleKey.C Then + Console.ForegroundColor = ConsoleColor.Gray + Console.BackgroundColor = ConsoleColor.Black + Console.Write("This will attempt a cleanup of fighters, are you sure? ") + If Console.ReadLine.ToLowerInvariant = "y" Then + Dim rcount As Integer = 0 + Dim j As Integer = 0 + While j < TheList.Count + If TheList(j).RD = 350 OrElse TheList(j).RD = 290.230506091092 OrElse TheList(j).K = 1500 OrElse TheList(j).K = 1662.2120026057642 OrElse TheList(j).K = 1337.7879973942358 OrElse (((match - TheList(j).LastMatch) > 60000) And (TheList(j).RD > 250)) Then + TheList.RemoveAt(j) + rcount += 1 + Else + j += 1 + End If + End While + Save() + Console.WriteLine("Cleaned up {0} entries", rcount) + End If + + + 'ElseIf tempkey.Key = ConsoleKey.T Then + ' Console.ForegroundColor = ConsoleColor.Gray + ' Console.BackgroundColor = ConsoleColor.Black + ' Console.Write("Tier [U/X/P/B/A/S]: ") + ' Dim qstr As String = Console.ReadLine + ' Select Case qstr.ToLower + ' Case "u" + ' p1.Tier = Glicko.Tiers.Unknown + ' p2.Tier = Glicko.Tiers.Unknown + ' Case "x" + ' p1.Tier = Glicko.Tiers.X + ' p2.Tier = Glicko.Tiers.X + ' Case "p" + ' p1.Tier = Glicko.Tiers.Potato + ' p2.Tier = Glicko.Tiers.Potato + ' Case "b" + ' p1.Tier = Glicko.Tiers.B + ' p2.Tier = Glicko.Tiers.B + ' Case "a" + ' p1.Tier = Glicko.Tiers.A + ' p2.Tier = Glicko.Tiers.A + ' Case "s" + ' p1.Tier = Glicko.Tiers.S + ' p2.Tier = Glicko.Tiers.S + ' End Select + ' Console.CursorTop -= 1 + ' Console.Write(blankline) + ' Console.CursorLeft = 0 + + + ElseIf tempkey.Key = ConsoleKey.Q Then + Console.ForegroundColor = ConsoleColor.Gray + Console.BackgroundColor = ConsoleColor.Black + Console.Write("Character name: ") + Dim qstr As String + Dim result As Glicko = Nothing + Dim found As Boolean = True + + found = Search(result) + + If found = True Then + Console.Write("[U]pdate [D]elete [M]atch: ") + qstr = Console.ReadLine + + Select Case qstr.ToLowerInvariant + + Case "u" + Console.Write("New K: ") + qstr = Console.ReadLine + If qstr <> "" Then + Try + result.K = CSng(qstr) + Catch + Console.WriteLine("Invalid string") + End Try + + End If + + Console.Write("New RD: ") + qstr = Console.ReadLine + If qstr <> "" Then + Try + result.RD = CSng(qstr) + Catch + Console.WriteLine("Invalid string") + End Try + End If + + Console.Write("New Age: ") + qstr = Console.ReadLine + If qstr <> "" Then + Try + result.LastMatch = match - CInt(qstr) + Catch + Console.WriteLine("Invalid string") + End Try + End If + + 'Console.Write("New Tier: ") + 'qstr = Console.ReadLine + 'If qstr <> "" Then + ' Select Case qstr.ToLower + ' Case "u" + ' result.Tier = Glicko.Tiers.Unknown + ' Case "x" + ' result.Tier = Glicko.Tiers.X + ' Case "p" + ' result.Tier = Glicko.Tiers.Potato + ' Case "b" + ' result.Tier = Glicko.Tiers.B + ' Case "a" + ' result.Tier = Glicko.Tiers.A + ' Case "s" + ' result.Tier = Glicko.Tiers.S + ' End Select + 'End If + + 'Console.WriteLine("K: [{0,4:####}] RD: {1,-3:###} Age: {2:0} Tier: {3} " & TrimString(result.Name, 38), result.K, result.RD, match - result.LastMatch, result.TierLetter) + Console.WriteLine("K: [{0,4:####}] RD: {1,-3:###} Age: {2:0} " & result.Name, result.K, result.RD, match - result.LastMatch) + Save() + Case "d" + Console.Write("Are you sure? ") + qstr = Console.ReadLine + If qstr.ToLowerInvariant = "y" Then + Console.WriteLine("{0} deleted", result.Name) + TheList.Remove(result) + Save() + End If + + Case "m" + Console.Write("Opponent name: ") + Dim result2 As Glicko = Nothing + found = Search(result2) + + If found = True Then + DoMatchup(result, result2, True) + Console.Write("Enter match scores: ") + Dim scorestr As String = Console.ReadLine + Console.CursorTop -= 1 + Console.CursorLeft = 0 + If scorestr <> Nothing Then + DoResults(result, result2, False, True, scorestr) + End If + Save() + End If + + Case Else + Console.CursorTop -= 1 + Console.Write(blankline) + Console.CursorLeft = 0 + + End Select + + + Else + Console.CursorTop -= 1 + Console.Write(blankline) + Console.CursorLeft = 0 + End If + + End If + + If Not bootstrap Then + System.Threading.Thread.Sleep(33.3333) + End If + End While + + + + End While + + + + Catch ex As Exception + Console.ForegroundColor = ConsoleColor.White + Console.BackgroundColor = ConsoleColor.Red + Console.WriteLine(ex.ToString) + Console.ReadLine() + End Try + End Sub + + Private Sub UpdateTitle(manual As Boolean, alert As String, remaining As String) + Dim titlestr As String = String.Empty + titlestr = "PepperBet - " + If manual Then + titlestr &= "(Manual mode) - " + End If + If alert <> "" Then + titlestr &= "Alert: " & alert & " - " + End If + If remaining <> "" Then + titlestr &= remaining + End If + Console.Title = titlestr + End Sub + + Private Function Search(ByRef result As Glicko) As Boolean + Dim qstr As String = "quit snooping the source code" + Dim found As Boolean = True + Dim results As New List(Of Glicko) + Dim leftindex As Integer = Console.CursorLeft + While qstr <> "" + qstr = Console.ReadLine + results = TheList.FindAll(Function(k) k.Name.ToLowerInvariant.Contains(qstr.ToLowerInvariant)) + If results.Count = 0 Then + Console.CursorTop -= 1 + Console.CursorLeft = leftindex + Console.Write(New String(" ", qstr.Length)) + Console.CursorLeft = leftindex + Else + Exit While + End If + End While + + + + If qstr = "" Then + found = False + ElseIf results.Count = 1 Then + result = results(0) + 'Console.WriteLine("K: [{0,4:####}] RD: {1,-3:###} Age: {2:0} Tier: {3} " & TrimString(result.Name, 38), result.K, result.RD, match - result.LastMatch, result.TierLetter) + Console.WriteLine("K: [{0,4:####}] RD: {1,-3:###} Age: {2:0} " & result.Name, result.K, result.RD, match - result.LastMatch) + + Else + results.Sort(Function(a, b) a.Name.CompareTo(b.Name)) + Console.ForegroundColor = ConsoleColor.White + 'Console.WriteLine("{0," + Math.Ceiling(Math.Log10(results.Count)).ToString + "} K RD Age Tier Name", "") + Console.WriteLine("{0," + Math.Ceiling(Math.Log10(results.Count)).ToString + "} K RD Age Name", "") + Console.ForegroundColor = ConsoleColor.Gray + For Each j In results + Console.WriteLine("{3," + Math.Ceiling(Math.Log10(results.Count)).ToString + "}: [{0,4:####}] {1,-3:###} {2,-6:####0} " & j.Name, j.K, j.RD, match - j.LastMatch, results.IndexOf(j)) + Next + Console.Write("Select: ") + Try + result = results(CInt(Console.ReadLine)) + Catch + found = False + End Try + End If + Return found + End Function + + Private Sub DoResults(p1 As Glicko, p2 As Glicko, p1win As Boolean, invcolors As Boolean, Optional scorestr As String = "") + Dim p1ki As Double = p1.K + Dim p2ki As Double = p2.K + Dim p1rdi As Double = p1.RD + Dim p2rdi As Double = p2.RD + Dim result As Integer 'red, blue, draw + Console.ForegroundColor = ConsoleColor.Gray + Console.BackgroundColor = ConsoleColor.Black + If scorestr = "" Then + If p1win = True Then + Glicko.UpdateBatch(p1, p2, 1, 0, match) + result = 1 + Else + Glicko.UpdateBatch(p1, p2, 0, 1, match) + result = 2 + End If + Else + Try + If scorestr.Split("-").Count = 3 Then 'draw included + Glicko.UpdateBatch(p1, p2, CInt(scorestr.Split("-")(0)), CInt(scorestr.Split("-")(1)), match, CInt(scorestr.Split("-")(2))) + If CInt(scorestr.Split("-")(0)) > CInt(scorestr.Split("-")(1)) Then + result = 1 + ElseIf CInt(scorestr.Split("-")(0)) < CInt(scorestr.Split("-")(1)) Then + result = 2 + Else + result = 3 + End If + ElseIf scorestr.Split("-").Count = 2 Then 'normal + Glicko.UpdateBatch(p1, p2, CInt(scorestr.Split("-")(0)), CInt(scorestr.Split("-")(1)), match) + If CInt(scorestr.Split("-")(0)) > CInt(scorestr.Split("-")(1)) Then + result = 1 + ElseIf CInt(scorestr.Split("-")(0)) < CInt(scorestr.Split("-")(1)) Then + result = 2 + Else + result = 3 + End If + Else 'error or something + If p1win = True Then + Glicko.UpdateBatch(p1, p2, 1, 0, match) + result = 1 + Else + Glicko.UpdateBatch(p1, p2, 0, 1, match) + result = 2 + End If + End If + Catch + + End Try + End If + + + Console.Write("K': {0,-4:####} [", p1.K) + If p1.K > p1ki Then + Console.ForegroundColor = ConsoleColor.Green + ElseIf p1.K < p1ki Then + Console.ForegroundColor = ConsoleColor.Red + Else + Console.ForegroundColor = ConsoleColor.Gray + End If + Console.Write("{0,5:+####;-####;0}", p1.K - p1ki) + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("] RD': {0,-3:###} (", p1.RD) + If p1.RD < p1rdi Then + Console.ForegroundColor = ConsoleColor.Green + ElseIf p1.RD > p1rdi Then + Console.ForegroundColor = ConsoleColor.Red + Else + Console.ForegroundColor = ConsoleColor.Gray + End If + Console.Write("{0,4:+###;-###;0}", p1.RD - p1rdi) + Console.ForegroundColor = ConsoleColor.Gray + Console.Write(") ") + If invcolors Then + Select Case result + Case 1 + Console.BackgroundColor = ConsoleColor.Red + Console.ForegroundColor = ConsoleColor.Black + Console.Write(" <------- ") + Case 2 + Console.BackgroundColor = ConsoleColor.Cyan + Console.ForegroundColor = ConsoleColor.Black + Console.Write(" -------> ") + Case 3 + Console.BackgroundColor = ConsoleColor.Gray + Console.ForegroundColor = ConsoleColor.Black + Console.Write(" -------- ") + End Select + Else + Select Case result + Case 1 + Console.ForegroundColor = ConsoleColor.Red + Console.Write(" <------- ") + Case 2 + Console.ForegroundColor = ConsoleColor.Cyan + Console.Write(" -------> ") + Case 3 + Console.ForegroundColor = ConsoleColor.Gray + Console.Write(" -------- ") + End Select + End If + + Console.BackgroundColor = ConsoleColor.Black + Console.ForegroundColor = ConsoleColor.Gray + Console.Write(" K': {0,-4:####} [", p2.K) + If p2.K > p2ki Then + Console.ForegroundColor = ConsoleColor.Green + ElseIf p2.K < p2ki Then + Console.ForegroundColor = ConsoleColor.Red + Else + Console.ForegroundColor = ConsoleColor.Gray + End If + Console.Write("{0,5:+####;-####;0}", p2.K - p2ki) + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("] RD': {0,-3:###} (", p2.RD) + If p2.RD < p2rdi Then + Console.ForegroundColor = ConsoleColor.Green + ElseIf p2.RD > p2rdi Then + Console.ForegroundColor = ConsoleColor.Red + Else + Console.ForegroundColor = ConsoleColor.Gray + End If + Console.Write("{0,4:+###;-###;0}", p2.RD - p2rdi) + Console.ForegroundColor = ConsoleColor.Gray + Console.Write(")" + vbCrLf) + End Sub + + Private Sub DoMatchup(p1 As Glicko, p2 As Glicko, invcolors As Boolean, Optional skip As Boolean = False) + If Not skip Then + p1.Prep(match) + p2.Prep(match) + End If + + Console.ForegroundColor = ConsoleColor.DarkGray + Console.BackgroundColor = ConsoleColor.Black + Console.WriteLine() + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("[") + If p1.K > p2.K Then + Console.ForegroundColor = ConsoleColor.Green + End If + Console.Write("{0,4:####}", p1.K) + + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("]") + If p1.K > p2.K Then + Console.ForegroundColor = ConsoleColor.White + Console.Write(" {0,3:#0%}", Glicko.Conf(p1, p2)) + Console.ForegroundColor = ConsoleColor.Gray + End If + Console.Write(" {0,-3:###} ", p1.RD) + If invcolors Then + Console.BackgroundColor = ConsoleColor.Red + Console.ForegroundColor = ConsoleColor.Black + Else + Console.ForegroundColor = ConsoleColor.Red + End If + 'Console.Write("{0,26}", TrimString(If(p1.LastMatch = match, "(N) ", "") + If((p1.Tier <> p2.Tier) And (p1.Tier <> Glicko.Tiers.Unknown) And (p2.Tier <> Glicko.Tiers.Unknown), "(" + p1.TierLetter + ") ", "") + p1.Name, 26)) + If p1.K > p2.K Then + Console.Write("{0,22}", TrimString(If((p1.LastMatch = match) And Not invcolors, "(N) ", "") & p1.Name, 22)) + Else + Console.Write("{0,26}", TrimString(If((p1.LastMatch = match) And Not invcolors, "(N) ", "") & p1.Name, 26)) + End If + + + Console.BackgroundColor = ConsoleColor.Black + Console.ForegroundColor = ConsoleColor.Gray + Console.Write(" vs ") + If invcolors Then + Console.BackgroundColor = ConsoleColor.Cyan + Console.ForegroundColor = ConsoleColor.Black + Else + Console.ForegroundColor = ConsoleColor.Cyan + End If + 'Console.Write("{0,-26}", TrimString(If(p2.LastMatch = match, "(N) ", "") + If((p1.Tier <> p2.Tier) And (p1.Tier <> Glicko.Tiers.Unknown) And (p2.Tier <> Glicko.Tiers.Unknown), "(" + p2.TierLetter + ") ", "") + p2.Name, 26)) + If p2.K > p1.K Then + Console.Write("{0,-22}", TrimString(If((p2.LastMatch = match) And Not invcolors, "(N) ", "") & p2.Name, 22)) + Else + Console.Write("{0,-26}", TrimString(If((p2.LastMatch = match) And Not invcolors, "(N) ", "") & p2.Name, 26)) + End If + Console.BackgroundColor = ConsoleColor.Black + Console.ForegroundColor = ConsoleColor.Gray + Console.Write(" [") + If p2.K > p1.K Then + Console.ForegroundColor = ConsoleColor.Green + End If + Console.Write("{0,4:####}", p2.K) + Console.ForegroundColor = ConsoleColor.Gray + Console.Write("]") + If p2.K > p1.K Then + Console.ForegroundColor = ConsoleColor.White + Console.Write(" {0,3:#0%}", Glicko.Conf(p1, p2)) + Console.ForegroundColor = ConsoleColor.Gray + End If + Console.Write(" {0,-3:###} " & vbNewLine, p2.RD) + End Sub + + Private Function TrimString(s As String, len As Integer) As String + If s.Length <= len Then + Return s + Else + Return s.Substring(0, len) + End If + End Function + + + Private Class Glicko + Enum Tiers + Unknown + Potato + B + A + S + X + End Enum + + Property K As Double + Private _RD As Double + Property RD As Double + Set(value As Double) + If value < RDmin Then + _RD = RDmin + Else + _RD = value + End If + End Set + Get + Return _RD + End Get + End Property + Property Name As String + Property LastMatch As Long + Property Tier As Tiers = Tiers.Unknown + ReadOnly Property TierString As String + Get + Select Case Me.Tier + Case Tiers.A + Return " A " + Case Tiers.B + Return " B " + Case Tiers.Potato + Return " P " + Case Tiers.S + Return " S" + Case Tiers.X + Return " X " + Case Tiers.Unknown + Return "U " + End Select + Return "" + End Get + End Property + ReadOnly Property TierLetter As String + Get + Select Case Me.Tier + Case Tiers.A + Return "A" + Case Tiers.B + Return "B" + Case Tiers.Potato + Return "P" + Case Tiers.S + Return "S" + Case Tiers.X + Return "X" + Case Tiers.Unknown + Return "U" + End Select + Return "" + End Get + End Property + + ''' + ''' Updates this Glicko rating after a match. MAKE SURE TO COPY THE OPPONENT BEFORE UPDATING + ''' + ''' Opponent that was faced + ''' Did this Glicko win? Draw=0.5 + ''' Match number of this match + ''' + Private Sub Update(opp() As Glicko, win() As Double, t As Long) + Dim E As Double = 0 + Dim g As Double = 0 + Dim dsum As Double = 0 + Dim rsum As Double = 0 + + For i = 0 To opp.Count - 1 + g = 1 / Math.Sqrt(1 + (3 * Math.Pow(q, 2) * Math.Pow(opp(i).RD, 2)) / Math.Pow(Math.PI, 2)) + E = 1 / (1 + Math.Pow(10, (g * (Me.K - opp(i).K)) / -400)) + dsum += Math.Pow(g, 2) * E * (1 - E) + rsum += g * (win(i) - E) + Next + + Dim dsq As Double = Math.Pow(Math.Pow(q, 2) * dsum, -1) + + Me.K = Me.K + (q / ((1 / Math.Pow(Me.RD, 2)) + (1 / dsq))) * rsum + Me.RD = Math.Max(Math.Sqrt(Math.Pow((1 / Math.Pow(Me.RD, 2)) + (1 / dsq), -1)), 30) + Me.LastMatch = t + End Sub + + Public Shared Sub UpdateBatch(a As Glicko, b As Glicko, Acount As Integer, Bcount As Integer, t As Long, Optional Dcount As Integer = 0) + Dim total As Integer = Acount + Bcount + Dcount + Dim Aresults(total - 1) As Double + Dim aopps(total - 1) As Glicko + Dim Bresults(total - 1) As Double + Dim bopps(total - 1) As Glicko + Dim upset As Boolean = False + Dim confidence As Double = Conf(a, b) + + Dim tempb As New Glicko("", -1) + tempb.K = b.K + tempb.RD = b.RD + + For i = 0 To total - 1 + aopps(i) = tempb + bopps(i) = a + Next + For i = 0 To Acount - 1 + Aresults(i) = 1 + Next + + For i = Acount To Acount + Bcount - 1 + Bresults(i) = 1 + Next + + For i = Acount + Bcount To total - 1 + Aresults(i) = 0.5 + Bresults(i) = 0.5 + Next + + If (Aresults.Average > 0.5 And b.K > a.K) Or (Bresults.Average > 0.5 And a.K > b.K) Then + upset = True + End If + + b.Update(bopps, Bresults, t) + a.Update(aopps, Aresults, t) + + 'My custom RD-increasing function in case of upsets + 'Note this increases after Glicko's decrease, so they oppose each other + 'If upset = True Then + ' 'U-factor is upset factor, the maximum possible increase in RD for a character if we trusted the results 100% accurately + ' Dim aUfactor As Double = u * a.RD * (confidence ^ e) + ' Dim bUfactor As Double = u * b.RD * (confidence ^ e) + ' 'F-factor is the fluke factor, more rounds means it's less of a fluke and we should increase more + ' Dim Ffactor As Double = 1 - (1 / (Aresults.Count + f)) + ' 'C-factor is the closeness factor, close matches are weighted less (5-0 more increase than 5-4) + ' Dim Cfactor As Double = (Math.Max(Aresults.Average, Bresults.Average) - 0.5) * 2 + ' a.RD = Math.Min(350, a.RD + (aUfactor * Ffactor * Cfactor)) + ' b.RD = Math.Min(350, b.RD + (bUfactor * Ffactor * Cfactor)) + 'End If + + + End Sub + + Public Shared Sub UpdateTiers(a As Glicko, b As Glicko) + If Now.DayOfWeek = DayOfWeek.Thursday And Now.Hour >= 18 And Now.Hour < 21 Then + 'shaker classic + Exit Sub + End If + + If a.Tier = Tiers.Unknown And b.Tier = Tiers.Unknown Then + Exit Sub + ElseIf a.Tier = Tiers.Unknown Then + a.Tier = b.Tier + ElseIf b.Tier = Tiers.Unknown Then + b.Tier = a.Tier + ElseIf b.Tier = a.Tier Then + Exit Sub + Else + a.Tier = Tiers.Unknown + b.Tier = Tiers.Unknown + + End If + Save() + End Sub + + + ''' + ''' Time-decays RD in preperation for a match + ''' + ''' Current match number + ''' + Public Sub Prep(t As Long) + Me.RD = Math.Min(350, Math.Sqrt(Math.Pow(Me.RD, 2) + Math.Pow(c, 2) * (t - Me.LastMatch))) + End Sub + + Public Sub New(name As String, t As Long) + Me.K = 1500 + Me.RD = 350 + Me.Name = name + Me.LastMatch = t + End Sub + + Public Function GenerateXMLItem() As XElement + Dim ret As New XElement("glicko") + ret.SetAttributeValue("name", Me.Name) + ret.SetAttributeValue("k", Me.K) + ret.SetAttributeValue("rd", Me.RD) + ret.SetAttributeValue("lastmatch", Me.LastMatch) + ret.SetAttributeValue("tier", CInt(Me.Tier)) + Return ret + End Function + + Private Shared Function erf(x As Double) As Double + 'Erf(x) approximation, max error 3e-7 + Dim a1 As Double = 0.0705230784 + Dim a2 As Double = 0.0422820123 + Dim a3 As Double = 0.0092705272 + Dim a4 As Double = 0.0001520143 + Dim a5 As Double = 0.0002765672 + Dim a6 As Double = 0.0000430638 + + a1 = a1 * x + a2 = a2 * (x ^ 2) + a3 = a3 * (x ^ 3) + a4 = a4 * (x ^ 4) + a5 = a5 * (x ^ 5) + a6 = a6 * (x ^ 6) + Return 1 - (1 / ((1 + a1 + a2 + a3 + a4 + a5 + a6) ^ 16)) + End Function + + Private Shared Function CDF(x As Double, mu As Double, sigma As Double) As Double + Return 0.5 * (1 + erf((x - mu) / (sigma * Math.Sqrt(2)))) + End Function + + Private Shared Function StdNorm(x As Double) As Double + Return Math.Exp(-0.5 * (x ^ 2)) / (Math.Sqrt(2 * Math.PI)) + End Function + + Private Shared Function Norm(x As Double, mu As Double, sigma As Double) As Double + Return (1 / sigma) * StdNorm((x - mu) / sigma) + End Function + + Public Shared Function Conf(a As Glicko, b As Glicko) As Double + Dim sum As Double + For i = 0 To 3000 Step 1 + sum += Math.Max(Norm(i, a.K, a.RD) - Norm(i, b.K, b.RD), 0) + Next + Return sum + End Function + + End Class + + Private Sub Save() + Dim thr As New Threading.Thread(AddressOf SaveDelegate) + thr.Start() + + End Sub + + Private Sub SaveDelegate() + Dim xd As New XElement("PepperBet") + Dim nodelist As New List(Of XElement) + For Each x In TheList + xd.Add(x.GenerateXMLItem) + Next + xd.Add(New XElement("count", match)) + For Each x In names + xd.Add(New XElement("name", x)) + Next + xd.Add(New XElement("watching", watching.ToString)) + xd.Add(New XElement("autoupdate", autoupdate.ToString)) + xd.Save("data.xml") + End Sub + + Private Sub Load() + If Not FileIO.FileSystem.FileExists("data.xml") Then + Exit Sub + End If + Dim xd As New XDocument + xd = XDocument.Load("data.xml") + match = CLng(xd...First.Value) + + For Each x In xd.. + names.Add(x.Value) + Next + Try + watching = CBool(xd...Value) + Catch + End Try + Try + autoupdate = CBool(xd...Value) + Catch + End Try + + For Each x In xd.. + Dim temp As New Glicko(x.@name, CLng(x.@lastmatch)) + temp.K = CDbl(x.@k) + temp.RD = CDbl(x.@rd) + temp.Tier = CInt(x.@tier) + TheList.Add(temp) + Next + + 'Dim thelist2 As New List(Of Glicko) + 'xd = XDocument.Load("data - Copy (2).xml") + 'For Each x In xd.. + ' Dim temp As New Glicko(x.@name, CLng(x.@lastmatch)) + ' temp.K = CDbl(x.@k) + ' temp.RD = CDbl(x.@rd) + ' temp.Tier = CInt(x.@tier) + ' TheList2.Add(temp) + 'Next + + 'For Each x In thelist2 + ' If TheList.FindIndex(Function(a) a.Name = x.Name) = -1 Then + ' TheList.Add(x) + ' End If + 'Next + + 'Save() + End Sub + + Private Sub CheckForUpdates(Optional force As Boolean = False) + If ((Now - lastupdatecheck).TotalMinutes > 30) Or force Then + Dim thr As New Thread(AddressOf AutoUpdateDelegate) + thr.Start(force) + End If + lastupdatecheck = Now + End Sub + + Private Sub AutoUpdateDelegate(report As Boolean) +#If CONFIG = "Debug" Then + Return +#Else + If Not report Then + Threading.Thread.Sleep(2000) + End If + Dim wc As New Net.WebClient + Dim verstring As String = "" + Try + verstring = wc.DownloadString(versionurl) + Catch ex As Exception + End Try + If (verstring <> version) And (verstring <> String.Empty) Then + Try + Console.ForegroundColor = ConsoleColor.White + Console.BackgroundColor = ConsoleColor.Blue + Console.WriteLine("New version detected: v{0}", verstring) + Console.WriteLine("Extracting autoupdater") + Dim tempfile As String = FileIO.FileSystem.GetTempFileName + FileIO.FileSystem.WriteAllBytes(tempfile, My.Resources.AutoUpdater, False) + FileIO.FileSystem.RenameFile(tempfile, tempfile.Split("\").Last & ".exe") + tempfile = tempfile & ".exe" + Console.WriteLine("Starting autoupdater") + + Process.Start(tempfile, " """ & Process.GetCurrentProcess.MainModule.FileName & """ """ & downloadurl & """") + Process.GetCurrentProcess.Kill() + Catch + Console.WriteLine("Error starting autoupdater") + Console.ForegroundColor = ConsoleColor.Gray + Console.BackgroundColor = ConsoleColor.Black + End Try + Else + If report Then + Console.Write("No new updates available") + Console.CursorLeft = 0 + End If + End If +#End If + End Sub + + Private Sub helpstring() + Console.WriteLine("[Enter/Esc] Enter/exit manual data entry") + Console.WriteLine("[Q]uery database") + Console.WriteLine("[C]leanup database") + Console.WriteLine("[N]ames (for bet watching)") + Console.WriteLine("[W]atch display toggle") + Console.WriteLine("[A]utomatic updates toggle") + Console.WriteLine("[F]orce update check") + Console.WriteLine("[H]elp message") + End Sub + +End Module diff --git a/PepperBet/PepperBet.vbproj b/PepperBet/PepperBet.vbproj new file mode 100755 index 0000000..997098a --- /dev/null +++ b/PepperBet/PepperBet.vbproj @@ -0,0 +1,134 @@ + + + + Debug + x86 + + + + + {F88AA82A-320E-4A3B-87A3-C07BFC6F3450} + Exe + PepperBet.Pepperbet + PepperBet + PepperBet + 512 + Console + v4.0 + Client + + + x86 + true + full + true + true + bin\Debug\ + PepperBet.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + x86 + pdbonly + false + true + true + bin\Release\ + PepperBet.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + False + ..\lib\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + + + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + + + + + copy "C:\Users\moose crap\documents\visual studio 2010\Projects\Splitter\AutoUpdater\bin\release\AutoUpdater.exe" "C:\Users\moose crap\documents\visual studio 2010\Projects\Pepperbet\Pepperbet\Resources\AutoUpdater.exe" + + + if "$(ConfigurationName)"=="Release" copy "$(TargetPath)" "W:\long-cat\projects\pepperbet\pepperbet.exe" +if "$(ConfigurationName)"=="Release" copy "$(ProjectDir)version.txt" "W:\long-cat\projects\pepperbet\version.txt" + + + \ No newline at end of file diff --git a/PepperBet/Resources/AutoUpdater.exe b/PepperBet/Resources/AutoUpdater.exe new file mode 100755 index 0000000..1d0d83b Binary files /dev/null and b/PepperBet/Resources/AutoUpdater.exe differ diff --git a/PepperBet/app.config b/PepperBet/app.config new file mode 100755 index 0000000..1245f6c --- /dev/null +++ b/PepperBet/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PepperBet/version.txt b/PepperBet/version.txt new file mode 100755 index 0000000..38094bd --- /dev/null +++ b/PepperBet/version.txt @@ -0,0 +1 @@ +1.9.12 \ No newline at end of file diff --git a/doc/bracket.txt b/doc/bracket.txt new file mode 100755 index 0000000..e8b7b81 --- /dev/null +++ b/doc/bracket.txt @@ -0,0 +1,50 @@ +Mr.big────────┐ +Lucifer───────┴─Lucifer───────┐ +Zan-b─────────┐ ├─Zan-b─────────┐ +Victor ortega─┴─Zan-b─────────┘ │ +Desteny remili┐ ├─Desteny remili┐ +True k'───────┴─Desteny remili┐ │ │ +Misuzu EX─────┐ ├─Desteny remili┘ │ +A-lee─────────┴─Misuzu EX─────┘ │ +Kaiba seto────┐ ├─Desteny remili +Hammerin' harr┴─Hammerin' harr┐ │ +9─────────────┐ ├─An ordinary so┐ │ +An ordinary so┴─An ordinary so┘ │ │ +Gh-golden silv┐ ├─An ordinary so┘ +Pheus_mor─────┴─Pheus_mor─────┐ │ +Gikoneko──────┐ ├─Pheus_mor─────┘ +Thouther──────┴─Gikoneko──────┘ + +Mr.big────────┐ 2-3 +Lucifer───────┴─Lucifer───────┐ 1-3 +Zan-b─────────┐ 3-1 ├─Zan-b─────────┐ +Victor ortega─┴─Zan-b─────────┘ │ 0-3 +Desteny remili┐ 3-0 ├─Desteny remili┐ +True k'───────┴─Desteny remili┐ 3-0 │ │ +Misuzu EX─────┐ 3-0 ├─Desteny remili┘ │ +A-lee─────────┴─Misuzu EX─────┘ │ 3-0 +Kaiba seto────┐ 1-3 ├─Desteny remili +Hammerin' harr┴─Hammerin' harr┐ 0-3 │ +9─────────────┐ 0-3 ├─An ordinary so┐ │ +An ordinary so┴─An ordinary so┘ │ 3-1 │ +Gh-golden silv┐ 0-3 ├─An ordinary so┘ +Pheus_mor─────┴─Pheus_mor─────┐ 3-1 │ +Gikoneko──────┐ 3-1 ├─Pheus_mor─────┘ +Thouther──────┴─Gikoneko──────┘ + +──────────────┐ +──────────────┴───────────────┐ +──────────────┐ ├───────────────┐ +──────────────┴───────────────┘ │ +──────────────┐ ├───────────────┐ +──────────────┴───────────────┐ │ │ +──────────────┐ ├───────────────┘ │ +──────────────┴───────────────┘ │ +──────────────┐ ├─ +──────────────┴───────────────┐ │ +──────────────┐ ├───────────────┐ │ +──────────────┴───────────────┘ │ │ +──────────────┐ ├───────────────┘ +──────────────┴───────────────┐ │ +──────────────┐ ├───────────────┘ +──────────────┴───────────────┘ \ No newline at end of file diff --git a/doc/display template.txt b/doc/display template.txt new file mode 100755 index 0000000..5cc8b42 --- /dev/null +++ b/doc/display template.txt @@ -0,0 +1,3 @@ +[2466] 263 Diablo_skeleton vs Zangief maskered 162 [2091] + $163,240,662 2.6:1 $126,554,662 +K': 2502 [+2013] RD': 203 (-121) <------- K': 2011 [-2031] RD': 103 (+161) \ No newline at end of file diff --git a/doc/state machine.png b/doc/state machine.png new file mode 100755 index 0000000..d40a7da Binary files /dev/null and b/doc/state machine.png differ diff --git a/lib/Newtonsoft.Json.dll b/lib/Newtonsoft.Json.dll new file mode 100755 index 0000000..81639f9 Binary files /dev/null and b/lib/Newtonsoft.Json.dll differ diff --git a/lib/Newtonsoft.Json.xml b/lib/Newtonsoft.Json.xml new file mode 100755 index 0000000..d2a7e8e --- /dev/null +++ b/lib/Newtonsoft.Json.xml @@ -0,0 +1,7905 @@ + + + + Newtonsoft.Json + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. + + + + + Initializes a new instance of the class with the specified . + + + + + Reads the next JSON token from the stream. + + true if the next token was read successfully; false if there are no more tokens to read. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Skips the children of the current token. + + + + + Sets the current token. + + The new token. + + + + Sets the current token and value. + + The new token. + The value. + + + + Sets the state based on current token type. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Changes the to Closed. + + + + + Gets the current reader state. + + The current reader state. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the reader is closed. + + + true to close the underlying stream or when + the reader is closed; otherwise false. The default is true. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + Get or set how time zones are handling when reading JSON. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets the type of the current JSON token. + + + + + Gets the text value of the current JSON token. + + + + + Gets The Common Language Runtime (CLR) type for the current JSON token. + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Specifies the state of the reader. + + + + + The Read method has not been called. + + + + + The end of the file has been reached successfully. + + + + + Reader is at a property. + + + + + Reader is at the start of an object. + + + + + Reader is in an object. + + + + + Reader is at the start of an array. + + + + + Reader is in an array. + + + + + The Close method has been called. + + + + + Reader has just read a value. + + + + + Reader is at the start of a constructor. + + + + + Reader in a constructor. + + + + + An error occurred that prevents the read operation from continuing. + + + + + The end of the file has been reached successfully. + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The reader. + + + + Initializes a new instance of the class. + + The stream. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The reader. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Reads the next JSON token from the stream as a . + + + A or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + + A . This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Changes the to Closed. + + + + + Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. + + + true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. + + + + + Gets or sets a value indicating whether the root object will be read as a JSON array. + + + true if the root object will be read as a JSON array; otherwise, false. + + + + + Gets or sets the used when reading values from BSON. + + The used when reading values from BSON. + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. + + + + + Creates an instance of the JsonWriter class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a Json object. + + + + + Writes the end of a Json object. + + + + + Writes the beginning of a Json array. + + + + + Writes the end of an array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end constructor. + + + + + Writes the property name of a name/value pair on a Json object. + + The name of the property. + + + + Writes the end of the current Json object or array. + + + + + Writes the current token. + + The to read the token from. + + + + Writes the specified end token. + + The end token to write. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON without changing the writer's state. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the writer is closed. + + + true to close the underlying stream or when + the writer is closed; otherwise false. The default is true. + + + + + Gets the top. + + The top. + + + + Gets the state of the writer. + + + + + Gets the path of the writer. + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling when writing JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The writer. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Writes the end. + + The token. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes the beginning of a Json array. + + + + + Writes the beginning of a Json object. + + + + + Writes the property name of a name/value pair on a Json object. + + The name of the property. + + + + Closes this stream and the underlying stream. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value that represents a BSON object id. + + The Object ID value to write. + + + + Writes a BSON regex. + + The regex pattern. + The regex options. + + + + Gets or sets the used when writing values to BSON. + When set to no conversion will occur. + + The used when writing values to BSON. + + + + Represents a BSON Oid (object id). + + + + + Initializes a new instance of the class. + + The Oid value. + + + + Gets or sets the value of the Oid. + + The value of the Oid. + + + + Converts a binary value to and from a base 64 string value. + + + + + Converts an object to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets the of the JSON produced by the JsonConverter. + + The of the JSON produced by the JsonConverter. + + + + Gets a value indicating whether this can read JSON. + + true if this can read JSON; otherwise, false. + + + + Gets a value indicating whether this can write JSON. + + true if this can write JSON; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Create a custom object + + The object type to convert. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Creates an object which will then be populated by the serializer. + + Type of the object. + The created object. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Provides a base class for converting a to and from JSON. + + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an Entity Framework EntityKey to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an ExpandoObject to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from its name string value. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + A cached representation of the Enum string representation to respect per Enum field name. + + The type of the Enum. + A map of enum field name to either the field name, or the configured enum member name (). + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets or sets a value indicating whether the written enum text should be camel case. + + true if the written enum text will be camel case; otherwise, false. + + + + Specifies how constructors are used when initializing objects during deserialization by the . + + + + + First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. + + + + + Json.NET will use a non-public default constructor before falling back to a paramatized constructor. + + + + + Converts a to and from a string (e.g. "1.2.3.4"). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Instructs the how to serialize the collection. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the id. + + The id. + + + + Gets or sets the title. + + The title. + + + + Gets or sets the description. + + The description. + + + + Gets the collection's items converter. + + The collection's items converter. + + + + Gets or sets a value that indicates whether to preserve object references. + + + true to keep object reference; otherwise, false. The default is false. + + + + + Gets or sets a value that indicates whether to preserve collection's items references. + + + true to keep collection's items object references; otherwise, false. The default is false. + + + + + Gets or sets the reference loop handling used when serializing the collection's items. + + The reference loop handling. + + + + Gets or sets the type name handling used when serializing the collection's items. + + The type name handling. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + The exception thrown when an error occurs during Json serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Specifies how dates are formatted when writing JSON text. + + + + + Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". + + + + + Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". + + + + + Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. + + + + + Date formatted strings are not parsed to a date type and are read as strings. + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Specifies how to treat the time value when converting between string and . + + + + + Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. + + + + + Treat as a UTC. If the object represents a local time, it is converted to a UTC. + + + + + Treat as a local time if a is being converted to a string. + If a string is being converted to , convert to a local time if a time zone is specified. + + + + + Time zone information should be preserved when converting. + + + + + Specifies formatting options for the . + + + + + No special formatting is applied. This is the default. + + + + + Causes child objects to be indented according to the and settings. + + + + + Instructs the to use the specified constructor when deserializing that object. + + + + + Represents a trace writer that writes to the application's instances. + + + + + Represents a trace writer. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + The that will be used to filter the trace messages passed to the writer. + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Gets the underlying type for the contract. + + The underlying type for the contract. + + + + Gets or sets the type created during deserialization. + + The type created during deserialization. + + + + Gets or sets whether this type contract is serialized as a reference. + + Whether this type contract is serialized as a reference. + + + + Gets or sets the default for this contract. + + The converter. + + + + Gets or sets the method called immediately after deserialization of the object. + + The method called immediately after deserialization of the object. + + + + Gets or sets the method called during deserialization of the object. + + The method called during deserialization of the object. + + + + Gets or sets the method called after serialization of the object graph. + + The method called after serialization of the object graph. + + + + Gets or sets the method called before serialization of the object. + + The method called before serialization of the object. + + + + Gets or sets the default creator method used to create the object. + + The default creator method used to create the object. + + + + Gets or sets a value indicating whether the default creator is non public. + + true if the default object creator is non-public; otherwise, false. + + + + Gets or sets the method called when an error is thrown during the serialization of the object. + + The method called when an error is thrown during the serialization of the object. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the default collection items . + + The converter. + + + + Gets or sets a value indicating whether the collection items preserve object references. + + true if collection items preserve object references; otherwise, false. + + + + Gets or sets the collection item reference loop handling. + + The reference loop handling. + + + + Gets or sets the collection item type name handling. + + The type name handling. + + + + Represents a trace writer that writes to memory. When the trace message limit is + reached then old trace messages will be removed as new messages are added. + + + + + Initializes a new instance of the class. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Returns an enumeration of the most recent trace messages. + + An enumeration of the most recent trace messages. + + + + Returns a of the most recent trace messages. + + + A of the most recent trace messages. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Specifies how strings are escaped when writing JSON text. + + + + + Only control characters (e.g. newline) are escaped. + + + + + All non-ASCII and control characters (e.g. newline) are escaped. + + + + + HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. + + + + + Represents a raw JSON string. + + + + + Represents a value in JSON (string, integer, date, etc). + + + + + Represents an abstract JSON token. + + + + + Represents a collection of objects. + + The type of token + + + + Gets the with the specified key. + + + + + + Provides an interface to enable a class to return line and position information. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Gets the current line position. + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Compares the values of two tokens, including the values of all descendant tokens. + + The first to compare. + The second to compare. + true if the tokens are equal; otherwise false. + + + + Adds the specified content immediately after this token. + + A content object that contains simple content or a collection of content objects to be added after this token. + + + + Adds the specified content immediately before this token. + + A content object that contains simple content or a collection of content objects to be added before this token. + + + + Returns a collection of the ancestor tokens of this token. + + A collection of the ancestor tokens of this token. + + + + Returns a collection of the sibling tokens after this token, in document order. + + A collection of the sibling tokens after this tokens, in document order. + + + + Returns a collection of the sibling tokens before this token, in document order. + + A collection of the sibling tokens before this token, in document order. + + + + Gets the with the specified key converted to the specified type. + + The type to convert the token to. + The token key. + The converted token value. + + + + Returns a collection of the child tokens of this token, in document order. + + An of containing the child tokens of this , in document order. + + + + Returns a collection of the child tokens of this token, in document order, filtered by the specified type. + + The type to filter the child tokens on. + A containing the child tokens of this , in document order. + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + A containing the child values of this , in document order. + + + + Removes this token from its parent. + + + + + Replaces this token with the specified token. + + The value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Returns the indented JSON for this token. + + + The indented JSON for this token. + + + + + Returns the JSON for this token using the given formatting and converters. + + Indicates how the output is formatted. + A collection of which will be used when writing the token. + The JSON for this token using the given formatting and converters. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Creates an for this token. + + An that can be used to read this token and its descendants. + + + + Creates a from an object. + + The object that will be used to create . + A with the value of the specified object + + + + Creates a from an object using the specified . + + The object that will be used to create . + The that will be used when reading the object. + A with the value of the specified object + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Selects the token that matches the object path. + + + The object path from the current to the + to be returned. This must be a string of property names or array indexes separated + by periods, such as Tables[0].DefaultView[0].Price in C# or + Tables(0).DefaultView(0).Price in Visual Basic. + + The that matches the object path or a null reference if no matching token is found. + + + + Selects the token that matches the object path. + + + The object path from the current to the + to be returned. This must be a string of property names or array indexes separated + by periods, such as Tables[0].DefaultView[0].Price in C# or + Tables(0).DefaultView(0).Price in Visual Basic. + + A flag to indicate whether an error should be thrown if no token is found. + The that matches the object path. + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Creates a new instance of the . All child tokens are recursively cloned. + + A new instance of the . + + + + Gets a comparer that can compare two tokens for value equality. + + A that can compare two nodes for value equality. + + + + Gets or sets the parent. + + The parent. + + + + Gets the root of this . + + The root of this . + + + + Gets the node type for this . + + The type. + + + + Gets a value indicating whether this token has childen tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the next sibling token of this node. + + The that contains the next sibling token. + + + + Gets the previous sibling token of this node. + + The that contains the previous sibling token. + + + + Gets the with the specified key. + + The with the specified key. + + + + Get the first child token of this token. + + A containing the first child token of the . + + + + Get the last child token of this token. + + A containing the last child token of the . + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Creates a comment with the given value. + + The value. + A comment with the given value. + + + + Creates a string with the given value. + + The value. + A string with the given value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Indicates whether the current object is equal to another object of the same type. + + + true if the current object is equal to the parameter; otherwise, false. + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format provider. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + The format provider. + + A that represents this instance. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Gets a value indicating whether this token has childen tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the node type for this . + + The type. + + + + Gets or sets the underlying token value. + + The underlying token value. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The raw json. + + + + Creates an instance of with the content of the reader's current token. + + The reader. + An instance of with the content of the reader's current token. + + + + Indicating whether a property is required. + + + + + The property is not required. The default state. + + + + + The property must be defined in JSON but can be a null value. + + + + + The property must be defined in JSON and cannot be a null value. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the object's properties. + + The object's properties. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the ISerializable object constructor. + + The ISerializable object constructor. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Get and set values for a using dynamic methods. + + + + + Provides methods to get and set values. + + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides data for the Error event. + + + + + Initializes a new instance of the class. + + The current object. + The error context. + + + + Gets the current object the error event is being raised against. + + The current object the error event is being raised against. + + + + Gets the error context. + + The error context. + + + + Represents a view of a . + + + + + Initializes a new instance of the class. + + The name. + Type of the property. + + + + When overridden in a derived class, returns whether resetting an object changes its value. + + + true if resetting the component changes its value; otherwise, false. + + The component to test for reset capability. + + + + + When overridden in a derived class, gets the current value of the property on a component. + + + The value of a property for a given component. + + The component with the property for which to retrieve the value. + + + + + When overridden in a derived class, resets the value for this property of the component to the default value. + + The component with the property value that is to be reset to the default value. + + + + + When overridden in a derived class, sets the value of the component to a different value. + + The component with the property value that is to be set. + The new value. + + + + + When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. + + + true if the property should be persisted; otherwise, false. + + The component with the property to be examined for persistence. + + + + + When overridden in a derived class, gets the type of the component this property is bound to. + + + A that represents the type of component this property is bound to. When the or methods are invoked, the object specified might be an instance of this type. + + + + + When overridden in a derived class, gets a value indicating whether this property is read-only. + + + true if the property is read-only; otherwise, false. + + + + + When overridden in a derived class, gets the type of the property. + + + A that represents the type of the property. + + + + + Gets the hash code for the name of the member. + + + + The hash code for the name of the member. + + + + + Used to resolve references when serializing and deserializing JSON by the . + + + + + Resolves a reference to its object. + + The serialization context. + The reference to resolve. + The object that + + + + Gets the reference for the sepecified object. + + The serialization context. + The object to get a reference for. + The reference to the object. + + + + Determines whether the specified object is referenced. + + The serialization context. + The object to test for a reference. + + true if the specified object is referenced; otherwise, false. + + + + + Adds a reference to the specified object. + + The serialization context. + The reference. + The object to reference. + + + + Specifies reference handling options for the . + + + + + + + + Do not preserve references when serializing types. + + + + + Preserve references when serializing into a JSON object structure. + + + + + Preserve references when serializing into a JSON array structure. + + + + + Preserve references when serializing. + + + + + Instructs the how to serialize the collection. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a flag indicating whether the array can contain null items + + A flag indicating whether the array can contain null items. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets a value indicating whether null items are allowed in the collection. + + true if null items are allowed in the collection; otherwise, false. + + + + Specifies default value handling options for the . + + + + + + + + + Include members where the member value is the same as the member's default value when serializing objects. + Included members are written to JSON. Has no effect when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + so that is is not written to JSON. + This option will ignore all default values (e.g. null for objects and nullable typesl; 0 for integers, + decimals and floating point numbers; and false for booleans). The default value ignored can be changed by + placing the on the property. + + + + + Members with a default value but no JSON will be set to their default value when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + and sets members to their default value when deserializing. + + + + + Instructs the to use the specified when serializing the member or class. + + + + + Initializes a new instance of the class. + + Type of the converter. + + + + Gets the type of the converter. + + The type of the converter. + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified member serialization. + + The member serialization. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the member serialization. + + The member serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Specifies the settings on a object. + + + + + Initializes a new instance of the class. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) is handled. + + Reference loop handling. + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + Missing member handling. + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how null values are handled during serialization and deserialization. + + Null value handling. + + + + Gets or sets how null default are handled during serialization and deserialization. + + The default value handling. + + + + Gets or sets a collection that will be used during serialization. + + The converters. + + + + Gets or sets how object references are preserved by the serializer. + + The preserve references handling. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + The type name handling. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + The contract resolver. + + + + Gets or sets the used by the serializer when resolving references. + + The reference resolver. + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the error handler called during serialization and deserialization. + + The error handler called during serialization and deserialization. + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets a value indicating whether there will be a check for additional content after deserializing an object. + + + true if there will be a check for additional content after deserializing an object; otherwise, false. + + + + + Represents a reader that provides validation. + + + + + Initializes a new instance of the class that + validates the content returned from the given . + + The to read from while validating. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a . + + + A or a null reference if the next JSON token is null. + + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Sets an event handler for receiving schema validation errors. + + + + + Gets the text value of the current Json token. + + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + + Gets the type of the current Json token. + + + + + + Gets the Common Language Runtime (CLR) type for the current Json token. + + + + + + Gets or sets the schema. + + The schema. + + + + Gets the used to construct this . + + The specified in the constructor. + + + + Compares tokens to determine whether they are equal. + + + + + Determines whether the specified objects are equal. + + The first object of type to compare. + The second object of type to compare. + + true if the specified objects are equal; otherwise, false. + + + + + Returns a hash code for the specified object. + + The for which a hash code is to be returned. + A hash code for the specified object. + The type of is a reference type and is null. + + + + Specifies the member serialization options for the . + + + + + All public members are serialized by default. Members can be excluded using or . + This is the default member serialization mode. + + + + + Only members must be marked with or are serialized. + This member serialization mode can also be set by marking the class with . + + + + + All public and private fields are serialized. Members can be excluded using or . + This member serialization mode can also be set by marking the class with + and setting IgnoreSerializableAttribute on to false. + + + + + Specifies how object creation is handled by the . + + + + + Reuse existing objects, create new objects when needed. + + + + + Only reuse existing objects. + + + + + Always create new objects. + + + + + Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Gets or sets the date time styles used when converting a date to and from JSON. + + The date time styles used when converting a date to and from JSON. + + + + Gets or sets the date time format used when converting a date to and from JSON. + + The date time format used when converting a date to and from JSON. + + + + Gets or sets the culture used when converting a date to and from JSON. + + The culture used when converting a date to and from JSON. + + + + Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Converts XML to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The calling serializer. + The value. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Checks if the attributeName is a namespace attribute. + + Attribute name to test. + The attribute name prefix if it has one, otherwise an empty string. + True if attribute name is for a namespace attribute, otherwise false. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. + + The name of the deserialize root element. + + + + Gets or sets a flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + true if the array attibute is written to the XML; otherwise, false. + + + + Gets or sets a value indicating whether to write the root JSON object. + + true if the JSON root object is omitted; otherwise, false. + + + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. + + + + + Initializes a new instance of the class with the specified . + + The TextReader containing the XML data to read. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Reads the next JSON token from the stream as a . + + + A or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Changes the state to closed. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Gets the current line position. + + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Instructs the to always serialize the member with the specified name. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + Name of the property. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets the null value handling used when serializing this property. + + The null value handling. + + + + Gets or sets the default value handling used when serializing this property. + + The default value handling. + + + + Gets or sets the reference loop handling used when serializing this property. + + The reference loop handling. + + + + Gets or sets the object creation handling used when deserializing this property. + + The object creation handling. + + + + Gets or sets the type name handling used when serializing this property. + + The type name handling. + + + + Gets or sets whether this property's value is serialized as a reference. + + Whether this property's value is serialized as a reference. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets a value indicating whether this property is required. + + + A value indicating whether this property is required. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Instructs the not to serialize the public field or public read/write property value. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. + + + + + Creates an instance of the JsonWriter class using the specified . + + The TextWriter to write to. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a Json object. + + + + + Writes the beginning of a Json array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the specified end token. + + The end token to write. + + + + Writes the property name of a name/value pair on a Json object. + + The name of the property. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. + + + + + Gets or sets which character to use to quote attribute values. + + + + + Gets or sets which character to use for indenting when is set to Formatting.Indented. + + + + + Gets or sets a value indicating whether object names will be surrounded with quotes. + + + + + The exception thrown when an error occurs while reading Json text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + The exception thrown when an error occurs while reading Json text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Represents a collection of . + + + + + Provides methods for converting between common language runtime types and JSON types. + + + + + + + + Represents JavaScript's boolean value true as a string. This field is read-only. + + + + + Represents JavaScript's boolean value false as a string. This field is read-only. + + + + + Represents JavaScript's null as a string. This field is read-only. + + + + + Represents JavaScript's undefined as a string. This field is read-only. + + + + + Represents JavaScript's positive infinity as a string. This field is read-only. + + + + + Represents JavaScript's negative infinity as a string. This field is read-only. + + + + + Represents JavaScript's NaN as a string. This field is read-only. + + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + The time zone handling when the date is converted to a string. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Serializes the specified object to a JSON string. + + The object to serialize. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string. + + The object to serialize. + Indicates how the output is formatted. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + Indicates how the output is formatted. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be is used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be is used. + + A JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using a collection of . + + The object to serialize. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using a collection of . + + The object to serialize. + Indicates how the output is formatted. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using a collection of . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be is used. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + The deserialized object from the Json string. + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be is used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The of object being deserialized. + The deserialized object from the Json string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + The deserialized object from the Json string. + + + + Deserializes the JSON to the given anonymous type. + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The object to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be is used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The type of the object to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be is used. + + The deserialized object from the JSON string. + + + + Asynchronously deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be is used. + + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be is used. + + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be is used. + + + + + Asynchronously populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be is used. + + + A task that represents the asynchronous populate operation. + + + + + Serializes the XML node to a JSON string. + + The node to serialize. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string. + + The node to serialize. + Indicates how the output is formatted. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XmlNode. + + + + Deserializes the XmlNode from a JSON string. + + The JSON string. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment. + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XmlNode + + + + Serializes the to a JSON string. + + The node to convert to JSON. + A JSON string of the XNode. + + + + Serializes the to a JSON string. + + The node to convert to JSON. + Indicates how the output is formatted. + A JSON string of the XNode. + + + + Serializes the to a JSON string. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XNode. + + + + Deserializes the from a JSON string. + + The JSON string. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment. + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XNode + + + + The exception thrown when an error occurs during Json serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Serializes and deserializes objects into and from the JSON format. + The enables you to control how objects are encoded into JSON. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance using the specified . + + The settings to be applied to the . + A new instance using the specified . + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Deserializes the Json structure contained by the specified . + + The that contains the JSON structure to deserialize. + The being deserialized. + + + + Deserializes the Json structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Deserializes the Json structure contained by the specified + into an instance of the specified type. + + The containing the object. + The type of the object to deserialize. + The instance of being deserialized. + + + + Deserializes the Json structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Serializes the specified and writes the Json structure + to a Stream using the specified . + + The used to write the Json structure. + The to serialize. + + + + Serializes the specified and writes the Json structure + to a Stream using the specified . + + The used to write the Json structure. + The to serialize. + + + + Occurs when the errors during serialization and deserialization. + + + + + Gets or sets the used by the serializer when resolving references. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how object references are preserved by the serializer. + + + + + Get or set how reference loops (e.g. a class referencing itself) is handled. + + + + + Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + + + + Get or set how null values are handled during serialization and deserialization. + + + + + Get or set how null default are handled during serialization and deserialization. + + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets a collection that will be used during serialization. + + Collection that will be used during serialization. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. + + + true if there will be a check for additional JSON content after deserializing an object; otherwise, false. + + + + + Contains the LINQ to JSON extension methods. + + + + + Returns a collection of tokens that contains the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the ancestors of every node in the source collection. + + + + Returns a collection of tokens that contains the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the descendants of every node in the source collection. + + + + Returns a collection of child properties of every object in the source collection. + + An of that contains the source collection. + An of that contains the properties of every object in the source collection. + + + + Returns a collection of child values of every object in the source collection with the given key. + + An of that contains the source collection. + The token key. + An of that contains the values of every node in the source collection with the given key. + + + + Returns a collection of child values of every object in the source collection. + + An of that contains the source collection. + An of that contains the values of every node in the source collection. + + + + Returns a collection of converted child values of every object in the source collection with the given key. + + The type to convert the values to. + An of that contains the source collection. + The token key. + An that contains the converted values of every node in the source collection with the given key. + + + + Returns a collection of converted child values of every object in the source collection. + + The type to convert the values to. + An of that contains the source collection. + An that contains the converted values of every node in the source collection. + + + + Converts the value. + + The type to convert the value to. + A cast as a of . + A converted value. + + + + Converts the value. + + The source collection type. + The type to convert the value to. + A cast as a of . + A converted value. + + + + Returns a collection of child tokens of every array in the source collection. + + The source collection type. + An of that contains the source collection. + An of that contains the values of every node in the source collection. + + + + Returns a collection of converted child tokens of every array in the source collection. + + An of that contains the source collection. + The type to convert the values to. + The source collection type. + An that contains the converted values of every node in the source collection. + + + + Returns the input typed as . + + An of that contains the source collection. + The input typed as . + + + + Returns the input typed as . + + The source collection type. + An of that contains the source collection. + The input typed as . + + + + Represents a JSON constructor. + + + + + Represents a token that can contain other tokens. + + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Returns a collection of the child tokens of this token, in document order. + + + An of containing the child tokens of this , in document order. + + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + + A containing the child values of this , in document order. + + + + + Returns a collection of the descendant tokens for this token in document order. + + An containing the descendant tokens of the . + + + + Adds the specified content as children of this . + + The content to be added. + + + + Adds the specified content as the first children of this . + + The content to be added. + + + + Creates an that can be used to add tokens to the . + + An that is ready to have content written to it. + + + + Replaces the children nodes of this token with the specified content. + + The content. + + + + Removes the child nodes from this token. + + + + + Occurs when the list changes or an item in the list changes. + + + + + Occurs before an item is added to the collection. + + + + + Occurs when the items list of the collection has changed, or the collection is reset. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets a value indicating whether this token has childen tokens. + + + true if this token has child values; otherwise, false. + + + + + Get the first child token of this token. + + + A containing the first child token of the . + + + + + Get the last child token of this token. + + + A containing the last child token of the . + + + + + Gets the count of child JSON tokens. + + The count of child JSON tokens + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name. + + The constructor name. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets or sets the name of this constructor. + + The constructor name. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Represents a collection of objects. + + The type of token + + + + An empty collection of objects. + + + + + Initializes a new instance of the struct. + + The enumerable. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the with the specified key. + + + + + + Represents a JSON object. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Gets an of this object's properties. + + An of this object's properties. + + + + Gets a the specified name. + + The property name. + A with the specified name or null. + + + + Gets an of this object's property values. + + An of this object's property values. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified property name. + + Name of the property. + The with the specified property name. + + + + Gets the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + One of the enumeration values that specifies how the strings will be compared. + The with the specified property name. + + + + Tries to get the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + The value. + One of the enumeration values that specifies how the strings will be compared. + true if a value was successfully retrieved; otherwise, false. + + + + Adds the specified property name. + + Name of the property. + The value. + + + + Removes the property with the specified name. + + Name of the property. + true if item was successfully removed; otherwise, false. + + + + Tries the get value. + + Name of the property. + The value. + true if a value was successfully retrieved; otherwise, false. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Returns the properties for this instance of a component. + + + A that represents the properties for this component instance. + + + + + Returns the properties for this instance of a component using the attribute array as a filter. + + An array of type that is used as a filter. + + A that represents the filtered properties for this component instance. + + + + + Returns a collection of custom attributes for this instance of a component. + + + An containing the attributes for this object. + + + + + Returns the class name of this instance of a component. + + + The class name of the object, or null if the class does not have a name. + + + + + Returns the name of this instance of a component. + + + The name of the object, or null if the object does not have a name. + + + + + Returns a type converter for this instance of a component. + + + A that is the converter for this object, or null if there is no for this object. + + + + + Returns the default event for this instance of a component. + + + An that represents the default event for this object, or null if this object does not have events. + + + + + Returns the default property for this instance of a component. + + + A that represents the default property for this object, or null if this object does not have properties. + + + + + Returns an editor of the specified type for this instance of a component. + + A that represents the editor for this object. + + An of the specified type that is the editor for this object, or null if the editor cannot be found. + + + + + Returns the events for this instance of a component using the specified attribute array as a filter. + + An array of type that is used as a filter. + + An that represents the filtered events for this component instance. + + + + + Returns the events for this instance of a component. + + + An that represents the events for this component instance. + + + + + Returns an object that contains the property described by the specified property descriptor. + + A that represents the property whose owner is to be found. + + An that represents the owner of the specified property. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Occurs when a property value changes. + + + + + Occurs when a property value is changing. + + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the with the specified property name. + + + + + + Represents a JSON array. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + The is read-only. + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + The is read-only. + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the at the specified index. + + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. + + + + + Initializes a new instance of the class. + + The token to read from. + + + + Reads the next JSON token from the stream as a . + + + A or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. + + + + + Initializes a new instance of the class writing to the given . + + The container being written to. + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a Json object. + + + + + Writes the beginning of a Json array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end. + + The token. + + + + Writes the property name of a name/value pair on a Json object. + + The name of the property. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Gets the token being writen. + + The token being writen. + + + + Represents a JSON property. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the property name. + + The property name. + + + + Gets or sets the property value. + + The property value. + + + + Gets the node type for this . + + The type. + + + + Specifies the type of token. + + + + + No token type has been set. + + + + + A JSON object. + + + + + A JSON array. + + + + + A JSON constructor. + + + + + A JSON object property. + + + + + A comment. + + + + + An integer value. + + + + + A float value. + + + + + A string value. + + + + + A boolean value. + + + + + A null value. + + + + + An undefined value. + + + + + A date value. + + + + + A raw JSON value. + + + + + A collection of bytes value. + + + + + A Guid value. + + + + + A Uri value. + + + + + A TimeSpan value. + + + + + Contains the JSON schema extension methods. + + + + + Determines whether the is valid. + + The source to test. + The schema to test with. + + true if the specified is valid; otherwise, false. + + + + + Determines whether the is valid. + + The source to test. + The schema to test with. + When this method returns, contains any error messages generated while validating. + + true if the specified is valid; otherwise, false. + + + + + Validates the specified . + + The source to test. + The schema to test with. + + + + Validates the specified . + + The source to test. + The schema to test with. + The validation event handler. + + + + Returns detailed information about the schema exception. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Resolves from an id. + + + + + Initializes a new instance of the class. + + + + + Gets a for the specified id. + + The id. + A for the specified id. + + + + Gets or sets the loaded schemas. + + The loaded schemas. + + + + Specifies undefined schema Id handling options for the . + + + + + Do not infer a schema Id. + + + + + Use the .NET type name as the schema Id. + + + + + Use the assembly qualified .NET type name as the schema Id. + + + + + Returns detailed information related to the . + + + + + Gets the associated with the validation error. + + The JsonSchemaException associated with the validation error. + + + + Gets the path of the JSON location where the validation error occurred. + + The path of the JSON location where the validation error occurred. + + + + Gets the text description corresponding to the validation error. + + The text description. + + + + Represents the callback method that will handle JSON schema validation events and the . + + + + + Resolves member mappings for a type, camel casing property names. + + + + + Used by to resolves a for a given . + + + + + Used by to resolves a for a given . + + + + + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + If set to true the will use a cached shared with other resolvers of the same type. + Sharing the cache will significantly performance because expensive reflection will only happen once but could cause unexpected + behavior if different instances of the resolver are suppose to produce different results. When set to false it is highly + recommended to reuse instances with the . + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Gets the serializable members for the type. + + The type to get serializable members for. + The serializable members for the type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates the constructor parameters. + + The constructor to create properties for. + The type's member properties. + Properties for the given . + + + + Creates a for the given . + + The matching member property. + The constructor parameter. + A created for the given . + + + + Resolves the default for the contract. + + Type of the object. + The contract's default . + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Determines which contract type is created for the given type. + + Type of the object. + A for the given type. + + + + Creates properties for the given . + + The type to create properties for. + /// The member serialization mode for the type. + Properties for the given . + + + + Creates the used by the serializer to get and set values from a member. + + The member. + The used by the serializer to get and set values from a member. + + + + Creates a for the given . + + The member's parent . + The member to create a for. + A created for the given . + + + + Resolves the name of the property. + + Name of the property. + Name of the property. + + + + Gets the resolved name of the property. + + Name of the property. + Name of the property. + + + + Gets a value indicating whether members are being get and set using dynamic code generation. + This value is determined by the runtime permissions available. + + + true if using dynamic code generation; otherwise, false. + + + + + Gets or sets the default members search flags. + + The default members search flags. + + + + Gets or sets a value indicating whether compiler generated members should be serialized. + + + true if serialized compiler generated members; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. + + + true if the interface will be ignored when serializing and deserializing types; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. + + + true if the attribute will be ignored when serializing and deserializing types; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Resolves the name of the property. + + Name of the property. + The property name camel cased. + + + + The default serialization binder used when resolving and loading classes from type names. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + The type of the object the formatter creates a new instance of. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Provides information surrounding an error. + + + + + Gets or sets the error. + + The error. + + + + Gets the original object that caused the error. + + The original object that caused the error. + + + + Gets the member that caused the error. + + The member that caused the error. + + + + Gets the path of the JSON location where the error occurred. + + The path of the JSON location where the error occurred. + + + + Gets or sets a value indicating whether this is handled. + + true if handled; otherwise, false. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the of the collection items. + + The of the collection items. + + + + Gets a value indicating whether the collection type is a multidimensional array. + + true if the collection type is a multidimensional array; otherwise, false. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Gets the of the dictionary keys. + + The of the dictionary keys. + + + + Gets the of the dictionary values. + + The of the dictionary values. + + + + Maps a JSON property to a .NET member or constructor parameter. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the type that declared this property. + + The type that declared this property. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets the name of the underlying member or parameter. + + The name of the underlying member or parameter. + + + + Gets the that will get and set the during serialization. + + The that will get and set the during serialization. + + + + Gets or sets the type of the property. + + The type of the property. + + + + Gets or sets the for the property. + If set this converter takes presidence over the contract converter for the property type. + + The converter. + + + + Gets the member converter. + + The member converter. + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets a value indicating whether this is readable. + + true if readable; otherwise, false. + + + + Gets a value indicating whether this is writable. + + true if writable; otherwise, false. + + + + Gets a value indicating whether this has a member attribute. + + true if has a member attribute; otherwise, false. + + + + Gets the default value. + + The default value. + + + + Gets a value indicating whether this is required. + + A value indicating whether this is required. + + + + Gets a value indicating whether this property preserves object references. + + + true if this instance is reference; otherwise, false. + + + + + Gets the property null value handling. + + The null value handling. + + + + Gets the property default value handling. + + The default value handling. + + + + Gets the property reference loop handling. + + The reference loop handling. + + + + Gets the property object creation handling. + + The object creation handling. + + + + Gets or sets the type name handling. + + The type name handling. + + + + Gets or sets a predicate used to determine whether the property should be serialize. + + A predicate used to determine whether the property should be serialize. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets an action used to set whether the property has been deserialized. + + An action used to set whether the property has been deserialized. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + A collection of objects. + + + + + Initializes a new instance of the class. + + The type. + + + + When implemented in a derived class, extracts the key from the specified element. + + The element from which to extract the key. + The key for the specified element. + + + + Adds a object. + + The property to add to the collection. + + + + Gets the closest matching object. + First attempts to get an exact case match of propertyName and then + a case insensitive match. + + Name of the property. + A matching property if found. + + + + Gets a property by property name. + + The name of the property to get. + Type property name string comparison. + A matching property if found. + + + + Specifies missing member handling options for the . + + + + + Ignore a missing member and do not attempt to deserialize it. + + + + + Throw a when a missing member is encountered during deserialization. + + + + + Specifies null value handling options for the . + + + + + + + + + Include null values when serializing and deserializing objects. + + + + + Ignore null values when serializing and deserializing objects. + + + + + Specifies reference loop handling options for the . + + + + + Throw a when a loop is encountered. + + + + + Ignore loop references and do not serialize. + + + + + Serialize loop references. + + + + + An in-memory representation of a JSON Schema. + + + + + Initializes a new instance of the class. + + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The object representing the JSON Schema. + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The to use when resolving schema references. + The object representing the JSON Schema. + + + + Load a from a string that contains schema JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Parses the specified json. + + The json. + The resolver. + A populated from the string that contains JSON. + + + + Writes this schema to a . + + A into which this method will write. + + + + Writes this schema to a using the specified . + + A into which this method will write. + The resolver used. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the id. + + + + + Gets or sets the title. + + + + + Gets or sets whether the object is required. + + + + + Gets or sets whether the object is read only. + + + + + Gets or sets whether the object is visible to users. + + + + + Gets or sets whether the object is transient. + + + + + Gets or sets the description of the object. + + + + + Gets or sets the types of values allowed by the object. + + The type. + + + + Gets or sets the pattern. + + The pattern. + + + + Gets or sets the minimum length. + + The minimum length. + + + + Gets or sets the maximum length. + + The maximum length. + + + + Gets or sets a number that the value should be divisble by. + + A number that the value should be divisble by. + + + + Gets or sets the minimum. + + The minimum. + + + + Gets or sets the maximum. + + The maximum. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + A flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + A flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + + + Gets or sets the minimum number of items. + + The minimum number of items. + + + + Gets or sets the maximum number of items. + + The maximum number of items. + + + + Gets or sets the of items. + + The of items. + + + + Gets or sets the of properties. + + The of properties. + + + + Gets or sets the of additional properties. + + The of additional properties. + + + + Gets or sets the pattern properties. + + The pattern properties. + + + + Gets or sets a value indicating whether additional properties are allowed. + + + true if additional properties are allowed; otherwise, false. + + + + + Gets or sets the required property if this property is present. + + The required property if this property is present. + + + + Gets or sets the identity. + + The identity. + + + + Gets or sets the a collection of valid enum values allowed. + + A collection of valid enum values allowed. + + + + Gets or sets a collection of options. + + A collection of options. + + + + Gets or sets disallowed types. + + The disallow types. + + + + Gets or sets the default value. + + The default value. + + + + Gets or sets the extend . + + The extended . + + + + Gets or sets the format. + + The format. + + + + Generates a from a specified . + + + + + Generate a from the specified type. + + The type to generate a from. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Gets or sets how undefined schemas are handled by the serializer. + + + + + Gets or sets the contract resolver. + + The contract resolver. + + + + The value types allowed by the . + + + + + No type specified. + + + + + String type. + + + + + Float type. + + + + + Integer type. + + + + + Boolean type. + + + + + Object type. + + + + + Array type. + + + + + Null type. + + + + + Any type. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the object member serialization. + + The member object serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Gets the object's properties. + + The object's properties. + + + + Gets the constructor parameters required for any non-default constructor + + + + + Gets or sets the override constructor used to create the object. + This is set when a constructor is marked up using the + JsonConstructor attribute. + + The override constructor. + + + + Gets or sets the parametrized constructor used to create the object. + + The parametrized constructor. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Get and set values for a using reflection. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + When applied to a method, specifies that the method is called when an error occurs serializing an object. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Returns a Restrictions object which includes our current restrictions merged + with a restriction limiting our type + + + + + Represents a method that constructs an object. + + The object type to create. + + + + Specifies type name handling options for the . + + + + + Do not include the .NET type name when serializing types. + + + + + Include the .NET type name when serializing into a JSON object structure. + + + + + Include the .NET type name when serializing into a JSON array structure. + + + + + Always include the .NET type name when serializing. + + + + + Include the .NET type name when the type of the object being serialized is not the same as its declared type. + + + + + Converts the value to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert the value to. + The converted type. + + + + Converts the value to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert the value to. + The converted value if the conversion was successful or the default value of T if it failed. + + true if initialValue was converted successfully; otherwise, false. + + + + + Converts the value to the specified type. If the value is unable to be converted, the + value is checked whether it assignable to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert or cast the value to. + + The converted type. If conversion was unsuccessful, the initial value + is returned if assignable to the target type. + + + + + Gets a dictionary of the names and values of an Enum type. + + + + + + Gets a dictionary of the names and values of an Enum type. + + The enum type to get names and values for. + + + + + Specifies the type of Json token. + + + + + This is returned by the if a method has not been called. + + + + + An object start token. + + + + + An array start token. + + + + + A constructor start token. + + + + + An object property name. + + + + + A comment. + + + + + Raw JSON. + + + + + An integer. + + + + + A float. + + + + + A string. + + + + + A boolean. + + + + + A null token. + + + + + An undefined token. + + + + + An object end token. + + + + + An array end token. + + + + + A constructor end token. + + + + + A Date. + + + + + Byte data. + + + + + Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. + + + + + Determines whether the collection is null or empty. + + The collection. + + true if the collection is null or empty; otherwise, false. + + + + + Adds the elements of the specified collection to the specified generic IList. + + The list to add to. + The collection of elements to add. + + + + Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer. + + The type of the elements of source. + A sequence in which to locate a value. + The object to locate in the sequence + An equality comparer to compare values. + The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. + + + + Gets the type of the typed collection's items. + + The type. + The type of the typed collection's items. + + + + Gets the member's underlying type. + + The member. + The underlying type of the member. + + + + Determines whether the member is an indexed property. + + The member. + + true if the member is an indexed property; otherwise, false. + + + + + Determines whether the property is an indexed property. + + The property. + + true if the property is an indexed property; otherwise, false. + + + + + Gets the member's value on the object. + + The member. + The target object. + The member's value on the object. + + + + Sets the member's value on the target object. + + The member. + The target. + The value. + + + + Determines whether the specified MemberInfo can be read. + + The MemberInfo to determine whether can be read. + /// if set to true then allow the member to be gotten non-publicly. + + true if the specified MemberInfo can be read; otherwise, false. + + + + + Determines whether the specified MemberInfo can be set. + + The MemberInfo to determine whether can be set. + if set to true then allow the member to be set non-publicly. + if set to true then allow the member to be set if read-only. + + true if the specified MemberInfo can be set; otherwise, false. + + + + + Determines whether the string is all white space. Empty string will return false. + + The string to test whether it is all white space. + + true if the string is all white space; otherwise, false. + + + + + Nulls an empty string. + + The string. + Null if the string was null, otherwise the string unchanged. + + + + Specifies the state of the . + + + + + An exception has been thrown, which has left the in an invalid state. + You may call the method to put the in the Closed state. + Any other method calls results in an being thrown. + + + + + The method has been called. + + + + + An object is being written. + + + + + A array is being written. + + + + + A constructor is being written. + + + + + A property is being written. + + + + + A write method has not been called. + + + +