Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created December 2, 2013 13:49
Show Gist options
  • Save rolfbjarne/cf950b0815f609e679c1 to your computer and use it in GitHub Desktop.
Save rolfbjarne/cf950b0815f609e679c1 to your computer and use it in GitHub Desktop.
'------------------------------------------------------------------------------
' <autogenerated>
' This code was generated by a tool.
' Mono Runtime Version: 4.0.30319.17020
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </autogenerated>
'------------------------------------------------------------------------------
Option Explicit On
Option Strict On
'
' This source code was auto-generated by Web Services Description Language Utility
'Mono Framework v4.0.30319.17020
'
'''<remarks/>
<System.Web.Services.WebServiceBinding(Name:="GoogleSearchPort", Namespace:="urn:GoogleSearch"), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code")> _
Partial Public Class GoogleSearchService
Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
Private doGetCachedPageOperationCompleted As System.Threading.SendOrPostCallback
Private doSpellingSuggestionOperationCompleted As System.Threading.SendOrPostCallback
Private doGoogleSearchOperationCompleted As System.Threading.SendOrPostCallback
Public Sub New()
MyBase.New
Me.Url = "http://api.google.com/search/beta2"
End Sub
Public Event doGetCachedPageCompleted As doGetCachedPageCompletedEventHandler
Public Event doSpellingSuggestionCompleted As doSpellingSuggestionCompletedEventHandler
Public Event doGoogleSearchCompleted As doGoogleSearchCompletedEventHandler
<System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:GoogleSearchAction", RequestNamespace:="urn:GoogleSearch", ResponseNamespace:="urn:GoogleSearch")> _
Public Function doGetCachedPage(ByVal key As String, ByVal url As String) As <System.Xml.Serialization.SoapElement("return")> Byte()
Dim results As Object() = Me.Invoke("doGetCachedPage", New Object() {key, url})
Return CType(results(0), Byte())
End Function
Public Function BegindoGetCachedPage(ByVal key As String, ByVal url As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
Return Me.BeginInvoke("doGetCachedPage", New Object() {key, url}, callback, asyncState)
End Function
Public Function EnddoGetCachedPage(ByVal asyncResult As System.IAsyncResult) As Byte()
Dim results As Object() = Me.EndInvoke(asyncResult)
Return CType(results(0), Byte())
End Function
Public Overloads Sub doGetCachedPageAsync(ByVal key As String, ByVal url As String)
Me.doGetCachedPageAsync(key, url, Nothing)
End Sub
Public Overloads Sub doGetCachedPageAsync(ByVal key As String, ByVal url As String, ByVal userState As Object)
If (Me.doGetCachedPageOperationCompleted Is Nothing) Then
Me.doGetCachedPageOperationCompleted = New System.Threading.SendOrPostCallback(AddressOf Me.OndoGetCachedPageCompleted)
End If
Me.InvokeAsync("doGetCachedPage", New Object() {key, url}, Me.doGetCachedPageOperationCompleted, userState)
End Sub
Private Sub OndoGetCachedPageCompleted(ByVal arg As Object)
If (Not (Me.doGetCachedPageCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg, System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent doGetCachedPageCompleted(Me, New doGetCachedPageCompletedEventArgs(invokeArgs.Results, invokeArgs.[Error], invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
<System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:GoogleSearchAction", RequestNamespace:="urn:GoogleSearch", ResponseNamespace:="urn:GoogleSearch")> _
Public Function doSpellingSuggestion(ByVal key As String, ByVal phrase As String) As <System.Xml.Serialization.SoapElement("return")> String
Dim results As Object() = Me.Invoke("doSpellingSuggestion", New Object() {key, phrase})
Return CType(results(0), String)
End Function
Public Function BegindoSpellingSuggestion(ByVal key As String, ByVal phrase As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
Return Me.BeginInvoke("doSpellingSuggestion", New Object() {key, phrase}, callback, asyncState)
End Function
Public Function EnddoSpellingSuggestion(ByVal asyncResult As System.IAsyncResult) As String
Dim results As Object() = Me.EndInvoke(asyncResult)
Return CType(results(0), String)
End Function
Public Overloads Sub doSpellingSuggestionAsync(ByVal key As String, ByVal phrase As String)
Me.doSpellingSuggestionAsync(key, phrase, Nothing)
End Sub
Public Overloads Sub doSpellingSuggestionAsync(ByVal key As String, ByVal phrase As String, ByVal userState As Object)
If (Me.doSpellingSuggestionOperationCompleted Is Nothing) Then
Me.doSpellingSuggestionOperationCompleted = New System.Threading.SendOrPostCallback(AddressOf Me.OndoSpellingSuggestionCompleted)
End If
Me.InvokeAsync("doSpellingSuggestion", New Object() {key, phrase}, Me.doSpellingSuggestionOperationCompleted, userState)
End Sub
Private Sub OndoSpellingSuggestionCompleted(ByVal arg As Object)
If (Not (Me.doSpellingSuggestionCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg, System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent doSpellingSuggestionCompleted(Me, New doSpellingSuggestionCompletedEventArgs(invokeArgs.Results, invokeArgs.[Error], invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
<System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:GoogleSearchAction", RequestNamespace:="urn:GoogleSearch", ResponseNamespace:="urn:GoogleSearch")> _
Public Function doGoogleSearch(ByVal key As String, ByVal q As String, ByVal start As Integer, ByVal maxResults As Integer, ByVal filter As Boolean, ByVal restrict As String, ByVal safeSearch As Boolean, ByVal lr As String, ByVal ie As String, ByVal oe As String) As <System.Xml.Serialization.SoapElement("return")> GoogleSearchResult
Dim results As Object() = Me.Invoke("doGoogleSearch", New Object() {key, q, start, maxResults, filter, restrict, safeSearch, lr, ie, oe})
Return CType(results(0), GoogleSearchResult)
End Function
Public Function BegindoGoogleSearch(ByVal key As String, ByVal q As String, ByVal start As Integer, ByVal maxResults As Integer, ByVal filter As Boolean, ByVal restrict As String, ByVal safeSearch As Boolean, ByVal lr As String, ByVal ie As String, ByVal oe As String, ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult
Return Me.BeginInvoke("doGoogleSearch", New Object() {key, q, start, maxResults, filter, restrict, safeSearch, lr, ie, oe}, callback, asyncState)
End Function
Public Function EnddoGoogleSearch(ByVal asyncResult As System.IAsyncResult) As GoogleSearchResult
Dim results As Object() = Me.EndInvoke(asyncResult)
Return CType(results(0), GoogleSearchResult)
End Function
Public Overloads Sub doGoogleSearchAsync(ByVal key As String, ByVal q As String, ByVal start As Integer, ByVal maxResults As Integer, ByVal filter As Boolean, ByVal restrict As String, ByVal safeSearch As Boolean, ByVal lr As String, ByVal ie As String, ByVal oe As String)
Me.doGoogleSearchAsync(key, q, start, maxResults, filter, restrict, safeSearch, lr, ie, oe, Nothing)
End Sub
Public Overloads Sub doGoogleSearchAsync(ByVal key As String, ByVal q As String, ByVal start As Integer, ByVal maxResults As Integer, ByVal filter As Boolean, ByVal restrict As String, ByVal safeSearch As Boolean, ByVal lr As String, ByVal ie As String, ByVal oe As String, ByVal userState As Object)
If (Me.doGoogleSearchOperationCompleted Is Nothing) Then
Me.doGoogleSearchOperationCompleted = New System.Threading.SendOrPostCallback(AddressOf Me.OndoGoogleSearchCompleted)
End If
Me.InvokeAsync("doGoogleSearch", New Object() {key, q, start, maxResults, filter, restrict, safeSearch, lr, ie, oe}, Me.doGoogleSearchOperationCompleted, userState)
End Sub
Private Sub OndoGoogleSearchCompleted(ByVal arg As Object)
If (Not (Me.doGoogleSearchCompletedEvent) Is Nothing) Then
Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg, System.Web.Services.Protocols.InvokeCompletedEventArgs)
RaiseEvent doGoogleSearchCompleted(Me, New doGoogleSearchCompletedEventArgs(invokeArgs.Results, invokeArgs.[Error], invokeArgs.Cancelled, invokeArgs.UserState))
End If
End Sub
End Class
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17020"), _
System.SerializableAttribute(), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Xml.Serialization.SoapType(Namespace:="urn:GoogleSearch")> _
Partial Public Class GoogleSearchResult
Private documentFilteringField As Boolean
Private searchCommentsField As String
Private estimatedTotalResultsCountField As Integer
Private estimateIsExactField As Boolean
Private resultElementsField As ResultElement()
Private searchQueryField As String
Private startIndexField As Integer
Private endIndexField As Integer
Private searchTipsField As String
Private directoryCategoriesField As DirectoryCategory()
Private searchTimeField As Double
'''<remarks/>
Public Property documentFiltering() As Boolean
Get
Return Me.documentFilteringField
End Get
Set
Me.documentFilteringField = Value
End Set
End Property
'''<remarks/>
Public Property searchComments() As String
Get
Return Me.searchCommentsField
End Get
Set
Me.searchCommentsField = Value
End Set
End Property
'''<remarks/>
Public Property estimatedTotalResultsCount() As Integer
Get
Return Me.estimatedTotalResultsCountField
End Get
Set
Me.estimatedTotalResultsCountField = Value
End Set
End Property
'''<remarks/>
Public Property estimateIsExact() As Boolean
Get
Return Me.estimateIsExactField
End Get
Set
Me.estimateIsExactField = Value
End Set
End Property
'''<remarks/>
Public Property resultElements() As ResultElement()
Get
Return Me.resultElementsField
End Get
Set
Me.resultElementsField = Value
End Set
End Property
'''<remarks/>
Public Property searchQuery() As String
Get
Return Me.searchQueryField
End Get
Set
Me.searchQueryField = Value
End Set
End Property
'''<remarks/>
Public Property startIndex() As Integer
Get
Return Me.startIndexField
End Get
Set
Me.startIndexField = Value
End Set
End Property
'''<remarks/>
Public Property endIndex() As Integer
Get
Return Me.endIndexField
End Get
Set
Me.endIndexField = Value
End Set
End Property
'''<remarks/>
Public Property searchTips() As String
Get
Return Me.searchTipsField
End Get
Set
Me.searchTipsField = Value
End Set
End Property
'''<remarks/>
Public Property directoryCategories() As DirectoryCategory()
Get
Return Me.directoryCategoriesField
End Get
Set
Me.directoryCategoriesField = Value
End Set
End Property
'''<remarks/>
Public Property searchTime() As Double
Get
Return Me.searchTimeField
End Get
Set
Me.searchTimeField = Value
End Set
End Property
End Class
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17020"), _
System.SerializableAttribute(), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Xml.Serialization.SoapType(Namespace:="urn:GoogleSearch")> _
Partial Public Class ResultElement
Private summaryField As String
Private uRLField1 As String
Private snippetField As String
Private titleField As String
Private cachedSizeField As String
Private relatedInformationPresentField As Boolean
Private hostNameField As String
Private directoryCategoryField As DirectoryCategory
Private directoryTitleField As String
'''<remarks/>
Public Property summary() As String
Get
Return Me.summaryField
End Get
Set
Me.summaryField = Value
End Set
End Property
'''<remarks/>
Public Property URL() As String
Get
Return Me.uRLField1
End Get
Set
Me.uRLField1 = Value
End Set
End Property
'''<remarks/>
Public Property snippet() As String
Get
Return Me.snippetField
End Get
Set
Me.snippetField = Value
End Set
End Property
'''<remarks/>
Public Property title() As String
Get
Return Me.titleField
End Get
Set
Me.titleField = Value
End Set
End Property
'''<remarks/>
Public Property cachedSize() As String
Get
Return Me.cachedSizeField
End Get
Set
Me.cachedSizeField = Value
End Set
End Property
'''<remarks/>
Public Property relatedInformationPresent() As Boolean
Get
Return Me.relatedInformationPresentField
End Get
Set
Me.relatedInformationPresentField = Value
End Set
End Property
'''<remarks/>
Public Property hostName() As String
Get
Return Me.hostNameField
End Get
Set
Me.hostNameField = Value
End Set
End Property
'''<remarks/>
Public Property directoryCategory() As DirectoryCategory
Get
Return Me.directoryCategoryField
End Get
Set
Me.directoryCategoryField = Value
End Set
End Property
'''<remarks/>
Public Property directoryTitle() As String
Get
Return Me.directoryTitleField
End Get
Set
Me.directoryTitleField = Value
End Set
End Property
End Class
'''<remarks/>
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17020"), _
System.SerializableAttribute(), _
System.Diagnostics.DebuggerStepThroughAttribute(), _
System.ComponentModel.DesignerCategoryAttribute("code"), _
System.Xml.Serialization.SoapType(Namespace:="urn:GoogleSearch")> _
Partial Public Class DirectoryCategory
Private fullViewableNameField As String
Private specialEncodingField As String
'''<remarks/>
Public Property fullViewableName() As String
Get
Return Me.fullViewableNameField
End Get
Set
Me.fullViewableNameField = Value
End Set
End Property
'''<remarks/>
Public Property specialEncoding() As String
Get
Return Me.specialEncodingField
End Get
Set
Me.specialEncodingField = Value
End Set
End Property
End Class
Partial Public Class doGetCachedPageCompletedEventArgs
Inherits System.ComponentModel.AsyncCompletedEventArgs
Private results As Object()
Friend Sub New(ByVal results As Object(), ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
MyBase.New(exception, cancelled, userState)
Me.results = results
End Sub
Public ReadOnly Property Result() As Byte()
Get
Me.RaiseExceptionIfNecessary()
Return CType(Me.results(0), Byte())
End Get
End Property
End Class
Public Delegate Sub doGetCachedPageCompletedEventHandler(ByVal sender As Object, ByVal args As doGetCachedPageCompletedEventArgs)
Partial Public Class doSpellingSuggestionCompletedEventArgs
Inherits System.ComponentModel.AsyncCompletedEventArgs
Private results As Object()
Friend Sub New(ByVal results As Object(), ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
MyBase.New(exception, cancelled, userState)
Me.results = results
End Sub
Public ReadOnly Property Result() As String
Get
Me.RaiseExceptionIfNecessary()
Return CType(Me.results(0), String)
End Get
End Property
End Class
Public Delegate Sub doSpellingSuggestionCompletedEventHandler(ByVal sender As Object, ByVal args As doSpellingSuggestionCompletedEventArgs)
Partial Public Class doGoogleSearchCompletedEventArgs
Inherits System.ComponentModel.AsyncCompletedEventArgs
Private results As Object()
Friend Sub New(ByVal results As Object(), ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object)
MyBase.New(exception, cancelled, userState)
Me.results = results
End Sub
Public ReadOnly Property Result() As GoogleSearchResult
Get
Me.RaiseExceptionIfNecessary()
Return CType(Me.results(0), GoogleSearchResult)
End Get
End Property
End Class
Public Delegate Sub doGoogleSearchCompletedEventHandler(ByVal sender As Object, ByVal args As doGoogleSearchCompletedEventArgs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment