Skip to content

Commit

Permalink
"ByVal" keyword no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mausch committed Dec 11, 2012
1 parent 7f3f125 commit a8b54d7
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions QuartzNetWebConsole.Views/EnumerableExtensions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

Public Module EnumerableExtensions
<Extension()>
Public Function WhereOdd(Of T)(ByVal s As IEnumerable(Of T)) As IEnumerable(Of T)
Public Function WhereOdd(Of T)(s As IEnumerable(Of T)) As IEnumerable(Of T)
Return s.Select(Function(e, i) New With {.e = e, .i = i}).
Where(Function(e) e.i Mod 2 <> 0).
Select(Function(e) e.e)
End Function

<Extension()>
Public Function WhereEven(Of T)(ByVal s As IEnumerable(Of T)) As IEnumerable(Of T)
Public Function WhereEven(Of T)(s As IEnumerable(Of T)) As IEnumerable(Of T)
Return s.Select(Function(e, i) New With {.e = e, .i = i}).
Where(Function(e) e.i Mod 2 = 0).
Select(Function(e) e.e)
Expand Down
2 changes: 1 addition & 1 deletion QuartzNetWebConsole.Views/GroupWithStatus.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Public ReadOnly Name As String
Public ReadOnly Paused As Boolean

Public Sub New(ByVal name As String, ByVal paused As Boolean)
Public Sub New(name As String, paused As Boolean)
Me.Name = name
Me.Paused = paused
End Sub
Expand Down
10 changes: 5 additions & 5 deletions QuartzNetWebConsole.Views/Helpers.vb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Imports MiniMVC

Public Module Helpers
Public Function SimpleForm(ByVal action As String, ByVal button As String) As XElement
Public Function SimpleForm(action As String, button As String) As XElement
Return _
<form method="post" action=<%= action %>>
<input type="submit" value=<%= button %>/>
Expand All @@ -10,15 +10,15 @@ Public Module Helpers

Public ReadOnly Stylesheet As XElement = <link rel="stylesheet" type="text/css" href="static.ashx?r=styles.css&amp;t=text%2Fcss"/>

Public Function YesNo(ByVal b As Boolean) As String
Public Function YesNo(b As Boolean) As String
Return If(b, "Yes", "No")
End Function

Public Function KV(Of K, V)(ByVal key As K, ByVal value As V) As KeyValuePair(Of K, V)
Public Function KV(Of K, V)(key As K, value As V) As KeyValuePair(Of K, V)
Return New KeyValuePair(Of K, V)(key, value)
End Function

Public Sub StripeTrs(ByVal xml As XElement)
Public Sub StripeTrs(xml As XElement)
For Each table In xml...<table>
Dim t = table
Dim trs = From x In t...<tr>
Expand All @@ -34,7 +34,7 @@ Public Module Helpers
Next
End Sub

Public Function XHTML(ByVal e As XElement) As XDocument
Public Function XHTML(e As XElement) As XDocument
StripeTrs(e)
Return e.MakeHTML5Doc()
End Function
Expand Down
2 changes: 1 addition & 1 deletion QuartzNetWebConsole.Views/JobWithContext.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Public Class JobWithContext
Public ReadOnly JobContext As IJobExecutionContext
Public ReadOnly Interruptible As Boolean

Public Sub New(ByVal job As IJobDetail, ByVal jobContext As IJobExecutionContext, ByVal interruptible As Boolean)
Public Sub New(job As IJobDetail, jobContext As IJobExecutionContext, interruptible As Boolean)
If job Is Nothing Then
Throw New ArgumentNullException("job")
End If
Expand Down
4 changes: 2 additions & 2 deletions QuartzNetWebConsole.Views/LogEntry.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Public ReadOnly Timestamp As DateTimeOffset
Public ReadOnly Description As String

Public Sub New(ByVal timestamp As DateTimeOffset, ByVal description As String)
Public Sub New(timestamp As DateTimeOffset, description As String)
Me.Timestamp = timestamp
Me.Description = description
End Sub

Public Sub New(ByVal description As String)
Public Sub New(description As String)
Me.Description = description
Timestamp = DateTimeOffset.Now
End Sub
Expand Down
6 changes: 3 additions & 3 deletions QuartzNetWebConsole.Views/PaginationInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
Public ReadOnly PageUrl As String
Public ReadOnly FirstItemIndex As Integer

Public Sub New(ByVal pageSlide As Integer, ByVal pageSize As Integer, ByVal totalItemCount As Integer, ByVal pageUrl As String, ByVal firstItemIndex As Integer)
Public Sub New(pageSlide As Integer, pageSize As Integer, totalItemCount As Integer, pageUrl As String, firstItemIndex As Integer)
Me.PageSlide = pageSlide
Me.PageSize = pageSize
Me.TotalItemCount = totalItemCount
Me.PageUrl = pageUrl
Me.FirstItemIndex = firstItemIndex
End Sub

Public Sub New(ByVal pageSize As Integer, ByVal totalItemCount As Integer, ByVal pageUrl As String, ByVal firstItemIndex As Integer)
Public Sub New(pageSize As Integer, totalItemCount As Integer, pageUrl As String, firstItemIndex As Integer)
Me.new(2, pageSize, totalItemCount, pageUrl, firstItemIndex)
End Sub

Expand Down Expand Up @@ -59,7 +59,7 @@
End Get
End Property

Public Function PageUrlFor(ByVal page As Integer) As String
Public Function PageUrlFor(page As Integer) As String
Dim start = (page - 1) * PageSize
Return PageUrl.Replace("!0", start.ToString())
End Function
Expand Down
2 changes: 1 addition & 1 deletion QuartzNetWebConsole.Views/TriggerWithState.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Public Class TriggerWithState
Public ReadOnly Trigger As ITrigger
Public ReadOnly State As TriggerState

Public Sub New(ByVal trigger As ITrigger, ByVal state As TriggerState)
Public Sub New(trigger As ITrigger, state As TriggerState)
Me.Trigger = trigger
Me.State = state
End Sub
Expand Down
2 changes: 1 addition & 1 deletion QuartzNetWebConsole.Views/TriggersByJobModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Public ReadOnly Job As String
Public ReadOnly Highlight As String

Public Sub New(ByVal triggers As IEnumerable(Of TriggerWithState), ByVal thisUrl As String, ByVal group As String, ByVal job As String, ByVal highlight As String)
Public Sub New(triggers As IEnumerable(Of TriggerWithState), thisUrl As String, group As String, job As String, highlight As String)
Me.Triggers = triggers
Me.ThisUrl = thisUrl
Me.Group = group
Expand Down
32 changes: 16 additions & 16 deletions QuartzNetWebConsole.Views/Views.vb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Public Module Views
</div>
End Function

Public Function Log(ByVal logs As IEnumerable(Of LogEntry), ByVal pagination As PaginationInfo, ByVal thisUrl As String) As XElement
Public Function Log(logs As IEnumerable(Of LogEntry), pagination As PaginationInfo, thisUrl As String) As XElement
Return _
<html>
<head>
Expand Down Expand Up @@ -55,7 +55,7 @@ Public Module Views
</html>
End Function

Public Function LogRSS(ByVal thisUrl As String, ByVal logs As IEnumerable(Of LogEntry)) As XElement
Public Function LogRSS(thisUrl As String, logs As IEnumerable(Of LogEntry)) As XElement
Return _
<rss version="2.0">
<channel>
Expand All @@ -75,7 +75,7 @@ Public Module Views
</rss>
End Function

Public Function SchedulerStatus(ByVal scheduler As IScheduler, ByVal metadata As SchedulerMetaData) As XElement
Public Function SchedulerStatus(scheduler As IScheduler, metadata As SchedulerMetaData) As XElement
Return _
<div class="group">
<h2>Scheduler name: <%= scheduler.SchedulerName %></h2>
Expand All @@ -100,7 +100,7 @@ Public Module Views

End Function

Public Function SchedulerListeners(ByVal scheduler As IScheduler) As XElement
Public Function SchedulerListeners(scheduler As IScheduler) As XElement
Return _
<div class="group">
<h2>Scheduler listeners</h2>
Expand All @@ -118,7 +118,7 @@ Public Module Views
</div>
End Function

Public Function SchedulerCalendars(ByVal calendars As ICollection(Of KeyValuePair(Of String, String))) As XElement
Public Function SchedulerCalendars(calendars As ICollection(Of KeyValuePair(Of String, String))) As XElement
Return _
<div class="group">
<h2>Calendars</h2>
Expand Down Expand Up @@ -201,13 +201,13 @@ Public Module Views

Public ReadOnly GlobalTriggerListeners As Func(Of ICollection(Of KeyValuePair(Of String, Type)), XElement) = GlobalEntityListeners("Trigger")

Public Function IndexPage(ByVal scheduler As IScheduler,
ByVal metadata As SchedulerMetaData,
ByVal triggerGroups As IEnumerable(Of GroupWithStatus),
ByVal jobGroups As IEnumerable(Of GroupWithStatus),
ByVal calendars As ICollection(Of KeyValuePair(Of String, String)),
ByVal jobListeners As ICollection(Of KeyValuePair(Of String, Type)),
ByVal triggerListeners As ICollection(Of KeyValuePair(Of String, Type))) As XElement
Public Function IndexPage(scheduler As IScheduler,
metadata As SchedulerMetaData,
triggerGroups As IEnumerable(Of GroupWithStatus),
jobGroups As IEnumerable(Of GroupWithStatus),
calendars As ICollection(Of KeyValuePair(Of String, String)),
jobListeners As ICollection(Of KeyValuePair(Of String, Type)),
triggerListeners As ICollection(Of KeyValuePair(Of String, Type))) As XElement
Return _
<html>
<head>
Expand All @@ -228,7 +228,7 @@ Public Module Views
</html>
End Function

Public Function TriggerGroup(ByVal group As String, ByVal paused As Boolean, ByVal thisUrl As String, ByVal highlight As String, ByVal triggers As IEnumerable(Of TriggerWithState)) As XElement
Public Function TriggerGroup(group As String, paused As Boolean, thisUrl As String, highlight As String, triggers As IEnumerable(Of TriggerWithState)) As XElement
Dim schedulerOp = Function(method As String) "scheduler.ashx?method=" + method +
"&groupName=" + group +
"&next=" + HttpUtility.UrlEncode(thisUrl)
Expand All @@ -252,7 +252,7 @@ Public Module Views
</html>
End Function

Public Function JobGroup(ByVal group As String, ByVal paused As Boolean, ByVal highlight As String, ByVal thisUrl As String, ByVal jobs As IEnumerable(Of JobWithContext)) As XElement
Public Function JobGroup(group As String, paused As Boolean, highlight As String, thisUrl As String, jobs As IEnumerable(Of JobWithContext)) As XElement
Dim schedulerOp = Function(method As String) "scheduler.ashx?method=" + method +
"&groupName=" + group +
"&next=" + HttpUtility.UrlEncode(thisUrl)
Expand Down Expand Up @@ -314,7 +314,7 @@ Public Module Views
</html>
End Function

Public Function TriggersByJob(ByVal model As TriggersByJobModel) As XElement
Public Function TriggersByJob(model As TriggersByJobModel) As XElement
Return _
<html>
<head>
Expand All @@ -331,7 +331,7 @@ Public Module Views
</html>
End Function

Public Function TriggerTable(ByVal triggers As IEnumerable(Of TriggerWithState), ByVal thisUrl As String, ByVal highlight As String) As XElement
Public Function TriggerTable(triggers As IEnumerable(Of TriggerWithState), thisUrl As String, highlight As String) As XElement
Return _
<table>
<tr>
Expand Down

0 comments on commit a8b54d7

Please sign in to comment.