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
<ComboBox IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding AvailableComboBoxValues}" SelectedItem="{Binding SelectedComboBoxItem}" /> |
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.ComponentModel; | |
using System.Runtime.CompilerServices; | |
namespace CodeExamples.Wpf.Interactivity | |
{ | |
public abstract class ViewModelBase : IViewModel | |
{ | |
#region Events |
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.Runtime.CompilerServices; | |
using System.Windows.Input; | |
namespace CodeExamples.Wpf.Interactivity | |
{ | |
public class MainWindowViewModel : ViewModelBase | |
{ | |
#region Fields and properties | |
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.Net; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace CodeExamples.Tests | |
{ | |
[TestClass] | |
public class FileWebRequestTests |
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
public static DateTime GetLinkerTime(this Assembly assembly, TimeZoneInfo target = null) | |
{ | |
var filePath = assembly.Location; | |
const int c_PeHeaderOffset = 60; | |
const int c_LinkerTimestampOffset = 8; | |
var buffer = new byte[2048]; | |
using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) | |
stream.Read(buffer, 0, 2048); |
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.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; |
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
public class SomeCalcController : Controller | |
{ | |
public ActionResult DoCalc(SomeCalc calc) | |
{ | |
calc.DoCalc(); | |
calc.Save(); | |
} | |
} |
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.IO; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace CodeSamples.Common.Diagnostics | |
{ |
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
-- declare all required tables | |
CREATE TABLE [dbo].[Abonents] | |
( | |
[Id] BIGINT NOT NULL IDENTITY(1, 1) PRIMARY KEY NONCLUSTERED, | |
[FirstName] NVARCHAR(64) NOT NULL, | |
[LastName] NVARCHAR(64) NOT NULL, | |
[Phone1] VARCHAR(20) NULL, | |
[Phone2] VARCHAR(20) NULL, |
OlderNewer