This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Task("Name", "embedded://DriveWorks.MyImagePlain16.png", "Category")> _ | |
Public Class DoSomethingWithOpenSpecification | |
Inherits Task | |
Private Sub New() | |
End Sub | |
''' <summary> | |
''' Overridden to indicate that a running specification is required by the task to execute. | |
''' </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports DriveWorks.Specification | |
<Condition("Is Not Owner", Nothing)> | |
Public Class IsNotOwner | |
Inherits Condition | |
Protected Overrides Function Evaluate(ByVal specificationContext As SpecificationContext) As Boolean | |
Dim currentUser = specificationContext.Group.CurrentUser.Id | |
Dim creator = specificationContext.Group.Specifications.GetSpecification(specificationContext.Id).CreatorId |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Flips the order of the bits in the passed-in byte. | |
/// </summary> | |
/// <param name="original">The byte whose bits should be flipped.</param> | |
/// <returns>A byte containing the flipped bits.</returns> | |
private static byte Flip(byte original) | |
{ | |
return TABLE_FLIP[original]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PubSub { | |
interface ISubscription { | |
(...args: any[]): void; | |
} | |
interface IDictionary { | |
[name: string] : ISubscription[]; | |
} | |
var registry : IDictionary = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Extension()> | |
Public Sub ReleaseAndExchange(Of T As Class)(ByRef oldComObject As T, ByVal newComObject As T) | |
If oldComObject IsNot Nothing Then | |
Marshal.ReleaseComObject(oldComObject) | |
End If | |
oldComObject = newComObject | |
End Sub |