Created
February 1, 2019 07:45
extending-sitecore-active-directory
This file contains 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
namespace Sample.Business | |
{ | |
public class ByteArraySettingsPropertyValue : StringSettingsPropertyValue | |
{ | |
public override object PropertyValue | |
{ | |
get | |
{ | |
return base.PropertyValue; | |
} | |
set | |
{ | |
var byteArray = value as byte[]; | |
base.PropertyValue = byteArray != null ? | |
Convert.ToBase64String((byte[])value) : | |
string.Empty; | |
} | |
} | |
} | |
} |
This file contains 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 LightLDAP; | |
using LightLDAP.Diagnostic; | |
namespace Sample.Business | |
{ | |
public class SettingsPropertyValueFactoryExtended : SettingsPropertyValueFactory | |
{ | |
public override ADSettingsPropertyValue GetSettingsPropertyValue(ADSettingsProperty property) | |
{ | |
switch (property.ADType) | |
{ | |
case "byte array": | |
return new ByteArraySettingsPropertyValue(property); | |
default: | |
return base.GetSettingsPropertyValue(property); | |
} | |
} | |
} | |
} |
This file contains 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
<setting name="LDAP.SettingsPropertyValueFactory" value="Sample.Business.SettingsPropertyValueFactoryExtended, Sample.Business" /> |
This file contains 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
<add type="System.String" name="Photo" customProviderData="ad|byte array|thumbnailPhoto" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment