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
| namespace DynamicLinqToXml | |
| { | |
| using System.Dynamic; | |
| using System.Text; | |
| using System.Xml; | |
| using System.Xml.Linq; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| using Newtonsoft.Json; | |
| [TestClass] |
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 static class LockedFileHelper | |
| { | |
| public static bool IsFileLocked(string fileName) | |
| { | |
| return IsFileLocked(new FileInfo(fileName)); | |
| } | |
| public static bool IsFileLocked(FileInfo file) | |
| { | |
| FileStream stream = null; |
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
| /// <summary> | |
| /// Exception Helper extension methods for using Data dictionary. | |
| /// </summary> | |
| public static class ExceptionExtensions | |
| { | |
| public static bool HasData(this Exception ex, Func<object, bool> keyFilter) | |
| { | |
| keyFilter = keyFilter ?? (o => true); | |
| return ex.Data.Cast<DictionaryEntry>().Any(datum => keyFilter(datum.Key)); |
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
| namespace Vastec.Ocr.Evaluator.Wpf | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using Autofac; | |
| using Caliburn.Micro; | |
| using Properties; | |
| using ViewModels; | |
| /// <remarks> |
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.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Text; | |
| using System.Windows.Forms; | |
| using System.IO; | |
| using Atalasoft.Annotate; | |
| using Atalasoft.Imaging.WinControls; |
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
| namespace Vastec.Ocr.Evaluator.Wpf | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| using Microsoft.Extensions.Logging; | |
| using Autofac; | |
| using Caliburn.Micro; | |
| using Serilog; | |
| using AzureImpl.Parsers; |
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 class derived | |
| { | |
| #region dateTimePicker1_ValueChanged Event | |
| private void dateTimePicker1_ValueChanged(object sender, EventArgs e) | |
| { | |
| ControlBase.Arg1ExceptionLogging(DtpValueChangedAction, sender, "dateTimePicker1_ValueChanged", "Date Picker Button"); | |
| } | |
| public void DtpValueChangedAction(object sender) |
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
| namespace MessyCode | |
| { | |
| /// <summary> | |
| /// The following issues were created in the BadCode() example: | |
| /// • Casting fsResultG.BoxFolderId which is a Nullable<long> (or better, long?) to long is a problem. Be sure to use the .Value property! | |
| /// • The only thing in the first call that needs to be cast, is the result of the result of Deserialize(), everything else is properly typed. | |
| /// • There is a possibility that fsResultG or fsResultG.BoxFolderId is null, this must be checked before the call since only a long value is accepted – this is a hidden crash error! | |
| /// • Please use the null propagating operators (?? And ?.) It’s silly to write code like: | |
| /// o finalizeData2 == null || finalizeData2.FolderFormList == null || finalizeData2.FolderFormList.Count < 1 | |
| /// o ReSharper will fix this for you in most cases. |
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
| It was the best of times | |
| it was the worst of times | |
| it was the age of wisdom | |
| it was the age of foolishness | |
| it was the epoch of belief | |
| it was the epoch of incredulity | |
| it was the season of Light | |
| it was the season of Darkness | |
| it was the spring of hope | |
| it was the winter of despair |
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
| namespace LearningMoreAutoMapper | |
| { | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Dynamic; | |
| using AutoMapper; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| [TestClass] | |
| public class AutoMapperLearningTests |
OlderNewer