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
| using System.Text; | |
| namespace LdapSearch | |
| { | |
| public static class Extensions | |
| { | |
| public static string GetObjectSid(this byte[] objectSid) | |
| { | |
| var sid = new StringBuilder("S-"); | |
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
| using NUnit.Framework; | |
| namespace LdapForNet.Tests | |
| { | |
| public class Tests | |
| { | |
| [TestCase("objectSid", new byte[] { 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, 0xB0, 0x68, 0x77, 0x23, 0x28, 0xE5, 0x17, 0xDF, 0xDE, 0x78, 0x25, 0x94, 0x86, 0x13, 0x00, 0x00})] | |
| public void BinaryAttributeTest(string attributeName, byte[] attributeValue) | |
| { | |
| // Prepare directory attribute. |
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
| package main | |
| import ( | |
| r "github.com/dancannon/gorethink" | |
| ) | |
| type Writer struct { | |
| ID string `gorethink:"id,omitempty"` | |
| Name string `gorethink:"name"` | |
| } |