View FileCheck.cs
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 System; | |
using System.IO; | |
using System.Text; | |
namespace Example | |
{ | |
public class FileCheck | |
{ | |
/// <summary> | |
/// Determines whether the specified file stream is a valid PDF. |
View CustomUnobtrusiveValidator.cshtml
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
@{ | |
ViewBag.Title = "Contact"; | |
} | |
<h2>@ViewBag.Title.</h2> | |
<h3>@ViewBag.Message</h3> | |
@using (Html.BeginForm()) | |
{ | |
<input type="hidden" class="include-validation" name="test" data-val="true" data-val-requiredoptout="verplicht veld" | |
data-val-requiredoptout-optoutfieldselector="#testcheck" data-val-requiredoptout-requiredfieldselector="#test2" /> |
View AddDependentLookup.cs
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
private void AddDependantLookup(List parentList, List targetList, Guid lookupFieldId, Field primaryLookupField, string displayName) | |
{ | |
Field toField = parentList.Fields.GetById(lookupFieldId); | |
_clientContext.Load(toField); | |
_clientContext.Load(targetList); | |
_clientContext.ExecuteQuery(); | |
Field dependantField = targetList.Fields.AddDependentLookup(displayName, primaryLookupField, | |
toField.StaticName); | |
FieldLookup dependantFieldLookup = _clientContext.CastTo<FieldLookup>(dependantField); | |
dependantFieldLookup.LookupField = toField.StaticName; |
View UpdateWebPartTitles.cs
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using Microsoft.SharePoint.Client; | |
using Microsoft.SharePoint.Client.WebParts; | |
namespace UpdateWebPartTitles | |
{ |
View Execute-Tests.ps1
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
Import-Module .\Tests\TestModule.psm1 | |
Start-Tests -testContainer C:\Example\Tests |