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; | |
| using System.Web.UI; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Resources; | |
| namespace AspNetWebFormsApp |
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.Configuration; | |
| using System.Dynamic; | |
| using System.Linq; | |
| namespace AppSettingsDemo | |
| { | |
| /// <summary> | |
| /// Wrapper for the values in the ConfigurationManager.AppSettings dictionary. | |
| /// Declare an instance of the AppSettings class with the dynamic keyword and all calls | |
| /// to any properties will lookup for the right key in the appSettings-section in you app.config |
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; | |
| using System.Diagnostics; | |
| using NLog; | |
| namespace Doering.Logging | |
| { | |
| /// <summary> | |
| /// Use MonitoredScope within a using statement to measure the time the operation needs. | |
| /// The result will be written to the NLog logger. | |
| /// </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
| using Doering.SharePoint; | |
| class Program { | |
| static void Main() { | |
| // Access a list within the current web with higher privileges. | |
| SPSecurityExtensions.RunInElevatedSite(delegate (SPSite site, SPWeb web) | |
| { |
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
| (function($) { | |
| if (typeof (window.ValidatorUpdateDisplay) === "undefined" || window.ValidatorUpdateDisplay == null) { | |
| console.warn("The ValidatorUpdateDisplay() method isn't defined. Can't inject custom validation."); | |
| } else { | |
| var aspUpdateDisplay = window.ValidatorUpdateDisplay; | |
| window.ValidatorUpdateDisplay = function (n) { | |
| var $controlToValidate = $(document.getElementById(n.controltovalidate)); |
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; | |
| using System.Drawing; | |
| using System.Drawing.Drawing2D; | |
| using System.Drawing.Imaging; | |
| using System.Linq; | |
| namespace ImageManipulation | |
| { | |
| /// <summary> | |
| /// Helper for manipulating images. Resizing images and creating thumbnails. |
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
| public partial class overview : Page | |
| { | |
| [DllImport("advapi32.dll")] | |
| public static extern uint EventActivityIdControl(uint controlCode, ref Guid activityId); | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| var correlationId = new Guid(); | |
| EventActivityIdControl(1, ref correlationId); | |
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
| private static readonly Lazy<string> _packagePhysicalPath = new Lazy<string>(ResolvePackagePath); | |
| public static string PackagePhysicalPath | |
| { | |
| get | |
| { | |
| return _packagePhysicalPath.Value; | |
| } | |
| } |
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
| do { | |
| Write-Host "." -NoNewline | |
| Start-Sleep -Seconds 3 | |
| } until (Get-HotFix -Id KB2693643 -ErrorAction SilentlyContinue) |
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 Microsoft.AspNetCore.Authentication; | |
| using Microsoft.AspNetCore.Builder; | |
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.AspNetCore.Http; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using System.IdentityModel.Tokens.Jwt; | |
| namespace AspNetCoreAuthTest | |
| { | |
| public class Startup |
OlderNewer