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 System.IO; | |
| namespace Stuff | |
| { | |
| public static class FileUtilities | |
| { | |
| /// <summary> | |
| /// Will attempt to create the path for a file if it doesn't exist |
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.Collections.Generic; | |
| namespace StructDesigner.Runtime.Extensions | |
| { | |
| public static class RegisterExtensions | |
| { | |
| /// <summary> | |
| /// Converts an array of registers into a byte array. | |
| /// </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 System.Linq; | |
| using System.Text; | |
| using System.Windows; | |
| namespace Encapsulate | |
| { | |
| /// <summary> | |
| /// Interaction logic for MainWindow.xaml | |
| /// </summary> | |
| public partial class MainWindow |
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
| foreach (var item in chain.ChainElements) | |
| { | |
| _output.WriteLine($"{item.Certificate.SubjectName.Name}"); | |
| foreach (var status in item.ChainElementStatus) | |
| { | |
| _output.WriteLine($" {status.Status}: {status.StatusInformation}"); | |
| } | |
| } |
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.IO; | |
| namespace CaptiveAire.Scada.Module.Base | |
| { | |
| /// <summary> | |
| /// A stream that limits the length of the source stream. This is a fast forward only stream. No seeking allowed. | |
| /// </summary> | |
| public class SizeLimitingStream : Stream | |
| { |
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.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using CaptiveAire.Scada.Module.Base.Extensions; | |
| namespace CaptiveAire.Scada.Module.Base | |
| { | |
| /// <summary> | |
| /// Treats multiple files as a single stream. Designed to be used on a large file that was downloaded in chunks. |
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 CaptiveAire.Scada.Module.Base.Extensions | |
| { | |
| public static class ArrayExtensions | |
| { | |
| public static string ToHex(this byte[] bytes, bool upperCase = false) | |
| { | |
| StringBuilder result = new StringBuilder(bytes.Length * 2); |
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.Collections.Generic; | |
| namespace CaptiveAire.Scada.Module.Base.Extensions | |
| { | |
| public static class IEnumerableExtensions | |
| { | |
| public static int? IndexOfOrNull<T>(this IEnumerable<T> items, Func<T, bool> func) | |
| { | |
| int index = 0; |
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.Collections.Generic; | |
| using System.IO; | |
| using System.Xml; | |
| using System.Xml.Linq; | |
| using System.Xml.XPath; | |
| using System.Linq; | |
| using System.Text; | |
| namespace CsProjectMigrator |
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 void LogMonoVersion() | |
| { | |
| try | |
| { | |
| Process process = new Process | |
| { | |
| StartInfo = | |
| { | |
| FileName = "mono", | |
| Arguments = "--version", |
OlderNewer