public DirectoryMember(IDirectoryMember directoryMember) { foreach (PropertyInfo p in typeof(IDirectoryMember).GetProperties()) { object v = null; try { v = p.GetValue(directoryMember, null); } catch(Exception ex) { throw new Exception(String.Format("Could not get value for property {0}", p.Name), ex); } try { p.SetValue(this, v, null); } catch(Exception ex) { throw new Exception(String.Format("Could not set value for property {0}", p.Name), ex); } } }
public Int32 CompareTo(IDirectoryMember other) { IconImage other2 = other as IconImage; if (other2 == null) { return(-1); } return(CompareTo(other2)); }
public static string GetFolderPath(IDirectoryMember member, PersonalFolder pf) { if (pf.NameFormat == PersonalFolderIdFormats.Fullname) { string name = DirectoryMemberRepository.GetName(member, DirectoryMemberNameFormats.Full | DirectoryMemberNameFormats.Sort) + " - " + member.UserName; return Path.Combine(pf.FolderPath, name); } else { return Path.Combine(pf.FolderPath, member.UserName); } }
public static string FormatFolderName(IDirectoryMember member, PersonalFolderIdFormats format) { if (format == PersonalFolderIdFormats.Fullname) { string name = DirectoryMemberRepository.GetName(member, DirectoryMemberNameFormats.Full | DirectoryMemberNameFormats.Sort) + " - " + member.UserName; return name; } else { return member.UserName; } }
public static string FormatFolderName(IDirectoryMember member, PersonalFolder pf) { return FormatFolderName(member, pf.NameFormat); }
public Boolean Equals(IDirectoryMember other) { return(Equals(other as IconImage)); }