Skip to content

Instantly share code, notes, and snippets.

Shimmy weitzhandler

Block or report user

Report or block weitzhandler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@weitzhandler
weitzhandler / ColumnReference.cs
Last active Nov 27, 2019
ColumnReference - easy way to convert between Excel column index and column letter
View ColumnReference.cs
internal struct ColumnReference
{
readonly uint _ColumnIndex;
const int AsciiTrim = 'A' - 1;
const int LastChar = 'Z' - AsciiTrim;
ColumnReference(uint columnIndex)
{
_ColumnIndex = columnIndex;
}
View MicrosoftDependencyResolverExtensions.cs
// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.DependencyInjection;
using ReactiveUI;
@weitzhandler
weitzhandler / MultiValueDictionary.cs
Last active Aug 29, 2017
MultiValueDictionary<TKey, TValue>
View MultiValueDictionary.cs
namespace System.Collections.ObjectModel
{
using System.Collections.Generic;
using System.Linq;
public class MultiValueDictionary<TKey, TElement>
: Collection<TElement>, ILookup<TKey, TElement>
{
public MultiValueDictionary(Func<TElement, TKey> keyExtractor)
: base(new Collection(keyExtractor))
View ObservableRangeCollection.cs
namespace System.Collections.ObjectModel
{
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
View ListViewAutoSizeBehavior.cs
namespace Xamarin.Forms
{
public class AutoSizeBehavior : Behavior<ListView>
{
ListView _ListView;
protected override void OnAttachedTo(ListView bindable)
{
_ListView = bindable;
bindable.HeightRequest = 0;
View AppEntityBase.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace TrackableEntities.Client
{
View ScalarCollection.cs
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Reflection;
namespace System.Collections.Specialized
@weitzhandler
weitzhandler / DeviceTimer.cs
Last active Jul 23, 2017
Device.Timer wrapper for Xamarin with Prism DI support
View DeviceTimer.cs
using System;
using System.Linq;
using System.Collections.Generic;
using Prism.Services;
namespace Xamarin.Forms
{
public class DeviceTimer
{
readonly Action _Task;
@weitzhandler
weitzhandler / IdentityStores.cs
Last active Jul 5, 2017
Microsoft.AspNetCore.Identity.EntityFramework
View IdentityStores.cs
using System;
using System.Data.Entity;
using System.Threading;
using System.Threading.Tasks;
using static Microsoft.AspNetCore.Identity.EntityFramework.BaseMethodWrapper;
namespace Microsoft.AspNetCore.Identity.EntityFramework
{
public interface IKeyConverter<TKey>
{
@weitzhandler
weitzhandler / PropertyFilterResolver.cs
Last active May 21, 2017
Json.NET property map filter resolver
View PropertyFilterResolver.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
namespace Newtonsoft.Json.Serialization
{
public class PropertyFilterResolver : DefaultContractResolver
{
You can’t perform that action at this time.