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 Microsoft.Practices.Prism.Mvvm; | |
using Reactive.Bindings; | |
using Reactive.Bindings.Extensions; | |
using System; | |
using System.Collections.ObjectModel; | |
using System.Linq; | |
using System.Reactive.Linq; | |
using System.Threading; | |
namespace RxPropEdu |
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 IObservable<PropertyPack<TElement, ReactiveProperty<TProperty>>> ObserveElementReactiveProperty<TCollection, TElement, TProperty>(this TCollection source, Expression<Func<TElement, ReactiveProperty<TProperty>>> propertySelector) | |
where TCollection : INotifyCollectionChanged, IEnumerable<TElement> | |
where TElement : class | |
{ | |
if (source == null) throw new ArgumentNullException("source"); | |
if (propertySelector == null) throw new ArgumentNullException("propertySelector"); | |
var memberExpression = (MemberExpression)propertySelector.Body; | |
var propertyInfo = memberExpression.Member as PropertyInfo; | |
if (propertyInfo == null) |
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
var person = new Person(); | |
// これをTextBoxとバインドするケースでは | |
var rp = person.ObserveProperty(x => x.Name).ToReactiveProperty(); | |
// こう書くべきという気もするかな | |
var rp = new ReactiveProperty<string>(person.Name); |
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
ISensorManager *pSensorManager; | |
ISensorCollection *pGyrometerSensorCollection; | |
ISensor *pGyrometerSensor; | |
if (!SUCCEEDED(::CoCreateInstance(CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pSensorManager)))) | |
{ | |
return { -1, -1, -1 }; | |
} | |
if (!SUCCEEDED(pSensorManager->GetSensorsByCategory(SENSOR_TYPE_GYROMETER_3D, &pGyrometerSensorCollection))) | |
{ |
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
extern "C" | |
{ | |
struct PluginVector3 | |
{ | |
double x; | |
double y; | |
double z; | |
}; | |
__declspec (dllexport) PluginVector3 GetAccelerometer(); |
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
http://compiledexperience.com/blog/posts/windows-10-title-bar/ | |
http://blog.thomasnigro.fr/2015/02/11/exploring-w10-apis-windows-and-titlebar/ |
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.Linq; | |
namespace ConsoleApplication5 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var l = new[] |
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 Reactive.Bindings; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
namespace WpfApplication11 | |
{ | |
public class MainWindowViewModel | |
{ | |
private readonly ObservableCollection<Person> people = new ObservableCollection<Person>(); |
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 Microsoft.AspNet.Identity; | |
using Microsoft.AspNet.Identity.Owin; | |
using Microsoft.Owin.Security; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace ASPNETIdentityRole.Models | |
{ |
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.Data.Common; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration; | |
using Microsoft.Practices.EnterpriseLibrary.Data; | |
using Microsoft.Practices.EnterpriseLibrary.Validation; | |
using System.ComponentModel; | |
using Microsoft.Practices.Unity.InterceptionExtension; | |
using System.Collections.Generic; |