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 ICommunicationObjectExtensions | |
{ | |
public static void TryCloseOrAbort(this ICommunicationObject obj) | |
{ | |
if (obj != null) | |
{ | |
if (obj.State != CommunicationState.Faulted && | |
obj.State != CommunicationState.Closed) | |
{ | |
try { obj.Close(); } |
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 void Sort(this ListItemCollection items) | |
{ | |
IList<ListItem> itemList = new List<ListItem>(); | |
foreach (ListItem item in items) | |
itemList.Add(item); | |
IEnumerable<ListItem> itemEnum = | |
from item in itemList orderby item.Text select item; | |
items.Clear(); |
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
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] | |
public class ConfigurationPropertyAttribute : Attribute, IComparable<ConfigurationPropertyAttribute> | |
{ | |
public ConfigurationPropertyAttribute(string displayName) | |
{ | |
DisplayName = displayName; | |
} | |
public string DisplayName { get; set; } |
NewerOlder