Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
using System.Security.AccessControl;
using System.Security.Principal;
namespace System.DirectoryServices
{
public class ActiveDirectoryAccessRule : ObjectAccessRule
{
public ActiveDirectoryRights ActiveDirectoryRights
{
get
{
throw new NotImplementedException ();
}
}
public ActiveDirectorySecurityInheritance InheritanceType
{
get
{
throw new NotImplementedException ();
}
}
public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type) : this(identity, (int)adRights, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
{
}
public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType) : this(identity, (int)adRights, type, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
{
}
public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType) : this(identity, (int)adRights, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
{
}
public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType) : this(identity, (int)adRights, type, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
{
}
public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, (int)adRights, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
{
}
public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, (int)adRights, type, objectType, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
{
}
internal ActiveDirectoryAccessRule(IdentityReference identity, int accessMask, AccessControlType type, Guid objectType, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid inheritedObjectType) : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, objectType, inheritedObjectType, type)
{
}
}
}

View File

@@ -0,0 +1,75 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
using System.Security.AccessControl;
using System.Security.Principal;
namespace System.DirectoryServices
{
public class ActiveDirectoryAuditRule : ObjectAuditRule
{
public ActiveDirectoryRights ActiveDirectoryRights
{
get
{
throw new NotImplementedException ();
}
}
public ActiveDirectorySecurityInheritance InheritanceType
{
get
{
throw new NotImplementedException ();
}
}
public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags) : this(identity, (int)adRights, auditFlags, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
{
}
public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType) : this(identity, (int)adRights, auditFlags, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
{
}
public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, ActiveDirectorySecurityInheritance inheritanceType) : this(identity, (int)adRights, auditFlags, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
{
}
public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType) : this(identity, (int)adRights, auditFlags, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
{
}
public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, (int)adRights, auditFlags, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
{
}
public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, (int)adRights, auditFlags, objectType, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
{
}
internal ActiveDirectoryAuditRule(IdentityReference identity, int accessMask, AuditFlags auditFlags, Guid objectGuid, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid inheritedObjectType) : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, objectGuid, inheritedObjectType, auditFlags)
{
}
}
}

View File

@@ -0,0 +1,50 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
namespace System.DirectoryServices
{
[Flags]
public enum ActiveDirectoryRights
{
Delete = 65536,
ReadControl = 131072,
WriteDacl = 262144,
WriteOwner = 524288,
Synchronize = 1048576,
AccessSystemSecurity = 16777216,
GenericRead = 131220,
GenericWrite = 131112,
GenericExecute = 131076,
GenericAll = 983551,
CreateChild = 1,
DeleteChild = 2,
ListChildren = 4,
Self = 8,
ReadProperty = 16,
WriteProperty = 32,
DeleteTree = 64,
ListObject = 128,
ExtendedRight = 256
}
}

View File

@@ -0,0 +1,35 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
namespace System.DirectoryServices
{
public enum ActiveDirectorySecurityInheritance
{
None,
All,
Descendents,
SelfAndChildren,
Children
}
}

View File

@@ -0,0 +1,60 @@
/******************************************************************************
* The MIT License
* Copyright (c) 2003 Novell Inc., www.novell.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
//
// System.DirectoryServices.AuthenticationTypes.cs
//
// Author:
// Sunil Kumar (sunilk@novell.com)
//
// (C) Novell Inc.
//
namespace System.DirectoryServices
{
/// <summary>
/// Specifies the types of authentication used in
/// System.DirectoryServices
/// This enumeration has a FlagsAttribute attribute
/// that allows a bitwise combination of its member values.
/// </summary>
[Flags]
[Serializable]
public enum AuthenticationTypes
{
Anonymous = 16,
Delegation = 256,
Encryption = 2,
FastBind = 32,
None = 0,
ReadonlyServer = 4,
Sealing = 128,
Secure = 1,
SecureSocketsLayer = 2,
ServerBind = 512,
Signing = 64
}
}

View File

@@ -0,0 +1,231 @@
2009-02-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
- The PropertyValueCollection class doesn't mark its data as dirty/changed in
- this[int index] setter
- Insert()
- Remove()
- Value setter
The DirectoryEntry class doesn't handle the clearing of an attribute (see
CommitEntry())
Patch from Juraj Skripsky that fixes bug #416985.
2008-07-06 Sebastien Pouliot <sebastien@ximian.com>
* DirectoryEntry.cs: Use typeof(LdapModification) instead of
Type.GetType and actually use the value afterward.
[Found using Gendarme AvoidTypeGetTypeForConstantStringsRule]
* SearchResultCollection.cs: Avoid infinite recursion in
Contains(SearchResult).
[Found using Gendarme BadRecursiveInvocationRule]
2007-05-21 Adar Wesley <adarw@mainsoft.com>
* DirectoryEntry.cs: added missing methods InvokeGet, InvokeSet.
2006-12-28 Jon Larimer <jlarimer@gmail.com>
* DirectorySearcher.cs: When using
System.DirectoryServices.DirectorySearcher to query a Windows
Active Directory Server, the results will almost always contain
referal nodes. These can probably be ignored, as there are also
non-referal responses.
With the below patch, the Mono DirectorySearcher can be used to
query Windows AD servers.
Fixes #80103.
2005-05-12 Boris Kirzner <borisk@mainsoft.com>
* DirectoryEntry.cs, DirectorySearcher.cs: fix object disposing.
2005-06-11 Boris Kirzner <borisk@mainsoft.com>
* DirectoryEntry.cs: fixes for RefreshCache()
-Property names should be sent to server if only particular properties
need to be updated.
-Refreshing all the properties should work with separate list,
so the original properties values are not damaged if the refresh
fails for some reason.
2005-30-10 Boris Kirzner <borisk@mainsoft.com>
* DirectoryEntries.cs: fix for null base dn.
* DirectorySearcher.cs: use server root authentication type for binding.
2005-28-07 Boris Kirzner <borisk@mainsoft.com>
* DirectoryEntry.cs: pass AuthenticationType as a parameter for
LdapConnection.Bind.
2005-06-19 Boris Kirzner <borisk@mainsoft.coim>
* DirectorySearcher.cs:
- Use ADsPath property (always represents an actual url)
instead of Path (may be null or empty string).
- Use PropertyNamesOnly property while perfoming search, so property
values retrieved only when needed.
- Create parent path in more clean way.
* DirectoryEntry.cs:
- Use ADsPath property (always represents an actual url)
instead of Path (may be null or empty string).
- InitEntry takes special care about rootDse entries.
- Path return empty string if assigned to null.
- Added ADsPath property. This is an "actual" entry path on the server.
If user does not specifies a path, it is resolved using rootDse
server entry properties. We need this since the user-specified Path
property should never change.
- Added GetProperties,SetProperties and LoadProperties methods
to handle internal properties load and assignment.
- Added DefaultHost and DefaultPort properties, so user can specify the
default LDAP server information using app config. If user does not
specify it, the localhost:389 is the default.
- Added InitToRootDse method - initializes current entry to specified
server rootDse entry.
- CheckEntry takes special care about rootDse entries.
- CommitEntry rewrited to use .NET style iteration. In addition,
the method uses entry peroperties whout enforsing their reload.
- Implemented RefreshCache methods.
- Added method GetLdapUrlString, returns LDAP URL string representation
that omits default port
(i.e. ldap://server/dn instead of ldap://server:389/dn),
as .NET does.
* PropertyValueCollection.cs: removed redundant MonoTodo attributes.
* SearchResult.cs: if underlined result properties collection is empty,
do not try to load a properties from it.
2005-06-14 Boris Kirzner <borisk@mainsoft.com>
* DirectorySearcher.cs : AdsPath property should not appear in the query, but it still should appear in the SearchResult properties (by initialization from result entry path).
2005-03-31 Boris Kirzner <borisk@mainsoft.com>
* DirectoryEntry.cs :
- Implemented UsePropertyCache.
- Refresh entry after Rename and MoveTo.
- CommitChanges : do not send request to server if no properties changed. Drop new flag after committing newly created entry.
- Disconnect only if connected in Close(). Clean up Dispose().
- Removed unnecessary console output.
* PropertyCollection.cs : Hold reference to parent DirectoryEntry.
* PropertyValueCollection.cs : Hold reference to parent DirectoryEntry. Call parent's CommitDeferred on collection changes.
2005-03-31 Boris Kirzner <borisk@mainsoft.com>
* DirectorySearcher.cs :
- Use common TimeSpan object to initialize properties default values.
- DoSearch uses SizeLimit and ServerTimeLimit. Do not throw if sie limit or time limit occurs on the server.
- Construct ADsPath property from resulting entry path.
- Implemented Dispose method.
2005-03-28 Boris Kirzner <borisk@mainsoft.com>
* DirectoryEntries.cs :
- Removed unnecessary console output.
* SearchResult.cs :
- Initialize Path property in constructor.
- Removed unnecessary console output.
2005-03-22 Boris Kirzner <borisk@mainsoft.com>
* DirectorySearcher.cs :
- ClientTimeout and ServerPageTimeLimit initialized to 1 second.
- SizeLimit initialized to 0.
- Setting SizeLimit to negative value throws an exception.
- Added private variable for ServerTime Limit.
- Avoid infinite loop in CacheResults.
- Removed emptycol, search result lazy evaluated intead of this.
- If the search did not return results, FindOne() should returns null.
- ADsPath property always loaded, or created from DN.
2005-03-22 Boris Kirzner <borisk@mainsoft.com>
* DirectoryEntries.cs : When adding new entry, do not set "objectclass"
property to include schemaClassName value.
2005-03-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* DirectoryEntry.cs: username and password are now initialized to null.
Patch by Boris Kirzner (Mainsoft).
2005-03-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* PropertyValueCollection.cs: the Value property for an empty collection
is now null and setting Value to null clears the collection. Patch by
Boris Kirzner (Mainsoft).
2005-01-26 Atsushi Enomoto <atsushi@ximian.com>
* DirectoryEntry.cs, DirectoryEntries.cs :
eliminate "throw new Exception".
2004-09-10 Sebastien Pouliot <sebastien@ximian.com>
* DirectoryServicesPermission.cs: Completed TODO.
* DirectoryServicesPermissionAttribute.cs: Added path validation and
enable the creation of unrestricted permissions.
* DirectoryServicesPermissionEntry.cs: Add internal method to return
an ResourcePermissionBaseEntry instance.
* DirectoryServicesPermissionEntryCollection.cs: Allow synchronization
of elements with the base permission class (required to enable Copy).
2004-06-15 Gert Driesen <drieseng@users.sourceforge.net>
* DirectoryServicesPermission.cs: renamed field to match MS.NET
* DirectoryServicesPermissionEntry.cs: fixed serialization
compatibility with MS.NET
* DirectoryServicesPermissionEntryCollection.cs: marked serializable,
added TODO for serialization compatibility
* ReferralChasingOption.cs: changed enum field values to match MS.NET
2004-06-03 Gert Driesen <drieseng@users.sourceforge.net>
* DirectoryEntries.cs: flagged field private to fix public API
* DirectoryEntry.cs: added protected override for Dispose, marked
properties TODO
* DirectoryServicesPermissionEntryCollection.cs: added stubs for
missing protected methods
* PropertyCollection.cs: flagged field private to fix public API
* PropertyValueCollection.cs: removed empty extra methods, added
stub for missing methods to fix public API
* SearchResult.cs: removed unused local variable
* SearchResultCollection.cs: flagged field private to fix public
API, added missing property Dispose method and finalizer
2004-05-16 Gert Driesen <drieseng@users.sourceforge.net>
* DirectoryServicesPermission.cs: marked sealed, added
Serializable attribute
* SearchResultCollection: made Handle public
2004-05-14 Raja R Harinath <rharinath@novell.com>
* SearchResultCollection.cs: Add a few more stubs.
* SchemaNameCollection.cs: Likewise.
* DirectoryServicesPermission.cs: Fix typo.
* SchemaNameCollection.cs: Revert. Add MonoTODO attributes.
2004-05-14 Raja R Harinath <rharinath@novell.com>
* DirectoryEntries.cs (SchemaFilter): New stub.
* DirectoryEntry.cs: Add missing [MonoTODO] to NotImplemented
classes. Remove DesignerCategory attribute.
* DirectorySearcher.cs: Likewise.
* PropertyValueCollection.cs (AddRange([object[]): Don't go into
an infinite loop.
(AddRange(PropertyValueCollection)): New.
(CopyTo): New.
* ResultPropertyCollection.cs (ResultPropertyCollection): Make
internal.
(CopyTo): New.
* SchemaNameCollection.cs: Implement.
* SortOption.cs (PropertyName, Direction): Add DSDescription and
DefaultValue attributes.
* DirectoryServicesPermission.cs: New file.
* DirectoryServicesPermissionAttribute.cs: Likewise.
* DirectoryServicesPermissionEntry.cs: Likewise.
* DirectoryServicesPermissionEntryCollection.cs: Likewise.
* TODOAttribute.cs: Likewise.
2004-01-15 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* ChangeLog: Added
* AssemblyInfo.cs: Removed
* DirectoryEntry.cs: Added attributes, fixed warning, stubbed missing
* DirectorySearcher.cs: Added attributes, stubbed missing
* DirectoryServicesPermissionAccess.cs: Added, implemented
* DSDescriptionAttribute.cs: Added, implemented
* DSDescriptionAttribute.cs, Added implemented

View File

@@ -0,0 +1,29 @@
//
// System.DirectoryServices.DSDescriptionAttribute.cs
//
// Author:
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2004 Andreas Nahr
//
//
using System.ComponentModel;
namespace System.DirectoryServices {
[AttributeUsage (AttributeTargets.All)]
public class DSDescriptionAttribute : DescriptionAttribute
{
public DSDescriptionAttribute (String description)
: base (description)
{
}
public override String Description {
get { return base.Description; }
}
}
}

View File

@@ -0,0 +1,300 @@
/******************************************************************************
* The MIT License
* Copyright (c) 2003 Novell Inc., www.novell.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
//
// System.DirectoryServices.DirectoryEntries.cs
//
// Author:
// Sunil Kumar (sunilk@novell.com)
//
// (C) Novell Inc.
//
using System.Collections;
using Novell.Directory.Ldap;
namespace System.DirectoryServices
{
/// <summary>
///Contains the children (child entries) of an entry in
/// a Ldap Directory
/// </summary>
public class DirectoryEntries : IEnumerable
{
private LdapConnection _Conn=null;
private string _Bpath=null;
private string _Buser=null;
private string _Bpass=null;
private string _Basedn=null;
private ArrayList m_oValues=null;
/// <summary> Initializes the Connection and other properties.
///
/// </summary>
private void InitBlock()
{
try {
LdapUrl lUrl=new LdapUrl(_Bpath);
_Conn = new LdapConnection();
_Conn.Connect(lUrl.Host,lUrl.Port);
_Conn.Bind(_Buser,_Bpass);
}
catch(LdapException ex) {
throw ex;
}
catch(Exception e) {
throw e;
}
}
internal string Basedn
{
get {
if( _Basedn == null) {
LdapUrl lurl=new LdapUrl(_Bpath);
string bdn = lurl.getDN();
if( bdn != null)
_Basedn = bdn;
else
_Basedn = "";
}
return _Basedn;
}
}
/// <summary> Contains the Path of the Container under which
/// the entries belongs to.
/// </summary>
internal string Bpath
{
get {
return _Bpath;
}
set {
_Bpath=value;
}
}
/// <summary> Returns the connection object used to communicate with
/// Ldap server
/// </summary>
internal LdapConnection Conn
{
get {
if( _Conn == null) {
InitBlock();
}
return _Conn;
}
set {
_Conn=value;
}
}
/// <summary> Constructs a collection of all the child entries of
/// an entry
/// </summary>
/// <param name="path"> Path of the entry
/// </param>
/// <param name="uname"> Username to Bind as while authenticating to ldap
/// server</param>
/// <param name="passwd"> Password of the user</param>
internal DirectoryEntries(string path, string uname, string passwd)
{
_Bpath = path;
_Buser = uname;
_Bpass = passwd;
}
/// <summary> Constructs a collection of all the child entries of
/// a entry
/// </summary>
/// <param name="path"> Path of the entry
/// </param>
/// <param name="lc"> connection object used to connect to ldap server
/// </param>
internal DirectoryEntries(string path, LdapConnection lc)
{
_Bpath = path;
_Conn = lc;
}
public SchemaNameCollection SchemaFilter {
[MonoTODO]
get { throw new NotImplementedException ("System.DirectoryServices.DirectoryEntries.SchemaFilter"); }
}
public IEnumerator GetEnumerator()
{
m_oValues= new ArrayList();
string[] attrs={"objectClass"};
LdapSearchResults lsc= Conn.Search( Basedn,
LdapConnection.SCOPE_ONE,
"objectClass=*",
attrs,
false);
LdapUrl Burl=new LdapUrl(_Bpath);
string host=Burl.Host;
int port=Burl.Port;
while (lsc.hasMore()) {
LdapEntry nextEntry = null;
try {
nextEntry = lsc.next();
}
catch(LdapException e) {
// Exception is thrown, go for next entry
continue;
}
DirectoryEntry dEntry=new DirectoryEntry(Conn);
string eFdn=nextEntry.DN;
LdapUrl curl=new LdapUrl(host,port,eFdn);
dEntry.Path=curl.ToString();
m_oValues.Add((DirectoryEntry) dEntry);
}
return m_oValues.GetEnumerator();
}
/// <summary> Creates a request to create a new entry in the container.
///
/// </summary>
/// <param name="name"> RDN of the entry to be created
/// </param>
/// <param name="schemaClassName"> StructuralClassName of the entry to be
/// created.
/// </param>
public DirectoryEntry Add( string name,string schemaClassName)
{
DirectoryEntry ent=new DirectoryEntry(Conn);
LdapUrl Burl=new LdapUrl(_Bpath);
string baseDn = Burl.getDN();
string eFdn=((baseDn != null && baseDn.Length != 0) ? (name + "," + baseDn) : name);
LdapUrl curl=new LdapUrl(Burl.Host,Burl.Port,eFdn);
ent.Path=curl.ToString();
ent.Nflag = true;
return ent;
}
/// <summary>
/// Deletes a child DirectoryEntry from this collection
/// </summary>
/// <param name="entry">The DirectoryEntry to delete</param>
public void Remove( DirectoryEntry entry )
{
LdapUrl Burl=new LdapUrl(_Bpath);
string eFDN = entry.Name + "," + Burl.getDN();
Conn.Delete( eFDN);
}
/// <summary>
/// Returns the child with the specified name.
/// </summary>
/// <param name="filter">relative distinguised name of the child
/// </param>
/// <returns>Child entry with the specified name </returns>
public DirectoryEntry Find(string filter)
{
DirectoryEntry child=CheckEntry(filter);
return child;
}
/// <summary>
/// Returns the child with the specified name and of the specified type.
/// </summary>
/// <param name="filter">relative distinguised name of the child
/// </param>
/// <param name="otype"> Type of the child i.e strutcuralObjectClass
/// name of the child </param>
/// <returns>Child entry with the specified name and type</returns>
public DirectoryEntry Find(string filter, string otype)
{
DirectoryEntry child=CheckEntry(filter);
if( child != null) {
if(child.Properties["objectclass"].ContainsCaselessStringValue(otype))
return child;
else
throw new SystemException("An unknown directory object was requested");
}
return child;
}
/// <summary>
/// Checks whether the entry with the specified Relative distinguised name
/// exists or not.
/// </summary>
/// <param name="rdn"> Relative distinguished name of the entry</param>
/// <returns>DirectoryEntry object of Entry if entry exists,
/// Null if entry doesn't exist </returns>
private DirectoryEntry CheckEntry(string rdn)
{
string Ofdn=null;
DirectoryEntry cEntry=null;
Ofdn=rdn+","+Basedn;
string[] attrs={"objectClass"};
try {
LdapSearchResults lsc= Conn.Search( Ofdn,
LdapConnection.SCOPE_BASE,
"objectClass=*",
attrs,
false);
while(lsc.hasMore()) {
LdapEntry nextEntry = null;
try {
nextEntry = lsc.next();
cEntry = new DirectoryEntry(Conn);
LdapUrl Burl=new LdapUrl(_Bpath);
LdapUrl curl=new LdapUrl(Burl.Host,Burl.Port,Ofdn);
cEntry.Path=curl.ToString();
}
catch(LdapException e) {
// Exception is thrown, go for next entry
throw e;
}
break;
}
}
catch(LdapException le)
{
if(le.ResultCode == LdapException.NO_SUCH_OBJECT) {
return null;
}
else {
throw le;
}
}
catch(Exception e) {
throw e;
}
return cEntry;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,66 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security.Permissions;
namespace System.DirectoryServices
{
[Serializable]
public class DirectoryServicesCOMException : COMException, ISerializable
{
public int ExtendedError {
get {
throw new NotImplementedException ();
}
}
public string ExtendedErrorMessage {
get {
throw new NotImplementedException ();
}
}
public DirectoryServicesCOMException ()
{
}
public DirectoryServicesCOMException (string message) : base(message)
{
}
public DirectoryServicesCOMException (string message, Exception inner) : base(message, inner)
{
}
protected DirectoryServicesCOMException (SerializationInfo info, StreamingContext context) : base(info, context)
{
}
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
throw new NotImplementedException ();
}
}
}

View File

@@ -0,0 +1,108 @@
/******************************************************************************
* The MIT License
* Copyright (c) 2003 Novell Inc., www.novell.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
//
// System.DirectoryServices.DirectoryEntry.cs
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Authors
// Raja R Harinath <rharinath@novell.com>
// Sebastien Pouliot <sebastien@ximian.com>
//
using System.Security.Permissions;
namespace System.DirectoryServices {
[Serializable]
public sealed class DirectoryServicesPermission : ResourcePermissionBase {
DirectoryServicesPermissionEntryCollection innerCollection;
public DirectoryServicesPermission ()
{
SetUp ();
}
public DirectoryServicesPermission (DirectoryServicesPermissionEntry[] entries)
{
SetUp ();
innerCollection = new DirectoryServicesPermissionEntryCollection (this);
innerCollection.AddRange (entries);
}
public DirectoryServicesPermission (PermissionState state)
: base (state)
{
SetUp ();
}
public DirectoryServicesPermission (DirectoryServicesPermissionAccess access, string path)
{
SetUp ();
innerCollection = new DirectoryServicesPermissionEntryCollection (this);
innerCollection.Add (new DirectoryServicesPermissionEntry (access, path));
}
public DirectoryServicesPermissionEntryCollection PermissionEntries {
get {
if (innerCollection == null) {
// must be here to work with XML deserialization
innerCollection = new DirectoryServicesPermissionEntryCollection (this);
}
return innerCollection;
}
}
// helpers
private void SetUp ()
{
PermissionAccessType = typeof (DirectoryServicesPermissionAccess);
TagNames = new string[1] { "Path" };
}
internal ResourcePermissionBaseEntry[] GetEntries ()
{
return base.GetPermissionEntries ();
}
internal void ClearEntries ()
{
base.Clear ();
}
internal void Add (object obj)
{
DirectoryServicesPermissionEntry dspe = (obj as DirectoryServicesPermissionEntry);
base.AddPermissionAccess (dspe.GetBaseEntry ());
}
internal void Remove (object obj)
{
DirectoryServicesPermissionEntry dspe = (obj as DirectoryServicesPermissionEntry);
base.RemovePermissionAccess (dspe.GetBaseEntry ());
}
}
}

View File

@@ -0,0 +1,22 @@
//
// System.DirectoryServices.DirectoryServicesPermissionAccess.cs
//
// Author:
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2004 Andreas Nahr
//
//
namespace System.DirectoryServices {
[Serializable]
[Flags]
public enum DirectoryServicesPermissionAccess
{
None = 0,
Browse = 2,
Write = 6
}
}

View File

@@ -0,0 +1,79 @@
/******************************************************************************
* The MIT License
* Copyright (c) 2003 Novell Inc., www.novell.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
//
// System.DirectoryServices.DirectoryEntry.cs
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Authors
// Raja R Harinath <rharinath@novell.com>
// Sebastien Pouliot <sebastien@ximian.com>
//
using System.Security;
using System.Security.Permissions;
namespace System.DirectoryServices {
[AttributeUsage(AttributeTargets.Assembly
| AttributeTargets.Class | AttributeTargets.Struct
| AttributeTargets.Constructor | AttributeTargets.Method
| AttributeTargets.Event, AllowMultiple=true, Inherited=false)]
[Serializable]
public class DirectoryServicesPermissionAttribute : CodeAccessSecurityAttribute {
string path;
DirectoryServicesPermissionAccess access;
public DirectoryServicesPermissionAttribute (SecurityAction action)
: base (action)
{
path = ResourcePermissionBase.Any;
access = DirectoryServicesPermissionAccess.Browse;
}
public string Path {
get { return path; }
set {
if (value == null)
throw new ArgumentNullException ("Path");
path = value;
}
}
public DirectoryServicesPermissionAccess PermissionAccess {
get { return access; }
set { access = value; }
}
public override IPermission CreatePermission ()
{
if (base.Unrestricted)
return new DirectoryServicesPermission (PermissionState.Unrestricted);
else
return new DirectoryServicesPermission (access, path);
}
}
}

View File

@@ -0,0 +1,65 @@
/******************************************************************************
* The MIT License
* Copyright (c) 2003 Novell Inc., www.novell.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
//
// System.DirectoryServices.DirectoryEntry.cs
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Authors
// Raja R Harinath <rharinath@novell.com>
// Sebastien Pouliot <sebastien@ximian.com>
//
using System.Security.Permissions;
namespace System.DirectoryServices {
[Serializable]
public class DirectoryServicesPermissionEntry {
DirectoryServicesPermissionAccess permissionAccess;
string path;
public DirectoryServicesPermissionEntry (DirectoryServicesPermissionAccess permissionAccess, string path)
{
this.permissionAccess = permissionAccess;
this.path = path;
}
public string Path {
get { return path; }
}
public DirectoryServicesPermissionAccess PermissionAccess {
get { return permissionAccess; }
}
// look at MSDN library ResourcePermissionBaseEntry sample for the "design"
internal ResourcePermissionBaseEntry GetBaseEntry ()
{
return new ResourcePermissionBaseEntry ((int)permissionAccess, new string [1] { path });
}
}
}

View File

@@ -0,0 +1,129 @@
/******************************************************************************
* The MIT License
* Copyright (c) 2003 Novell Inc., www.novell.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
//
// System.DirectoryServices.DirectoryServicesPermissionEntryCollection.cs
//
// Copyright (C) 2004 Novell Inc.
//
// Written by Raja R Harinath <rharinath@novell.com>
//
using System.Collections;
using System.Security.Permissions;
namespace System.DirectoryServices {
// when deserializing an instance serialized by MS.NET, you get the following
// error : Field "owner" not found in class ....
[Serializable]
[MonoTODO ("Fix serialization compatibility with MS.NET")]
public class DirectoryServicesPermissionEntryCollection : CollectionBase {
private DirectoryServicesPermission owner;
internal DirectoryServicesPermissionEntryCollection (DirectoryServicesPermission owner)
{
this.owner = owner;
ResourcePermissionBaseEntry[] entries = owner.GetEntries ();
if (entries.Length > 0) {
foreach (ResourcePermissionBaseEntry entry in entries) {
DirectoryServicesPermissionAccess dspa = (DirectoryServicesPermissionAccess) entry.PermissionAccess;
DirectoryServicesPermissionEntry dspe = new DirectoryServicesPermissionEntry (dspa, entry.PermissionAccessPath [0]);
// we don't want to add them (again) to the base class
InnerList.Add (dspe);
}
}
}
public DirectoryServicesPermissionEntry this [int index] {
get { return List[index] as DirectoryServicesPermissionEntry; }
set { List[index] = value; }
}
public int Add (DirectoryServicesPermissionEntry entry)
{
return List.Add (entry);
}
public void AddRange (DirectoryServicesPermissionEntry[] entries)
{
foreach (DirectoryServicesPermissionEntry entry in entries)
Add (entry);
}
public void AddRange (DirectoryServicesPermissionEntryCollection entries)
{
foreach (DirectoryServicesPermissionEntry entry in entries)
Add (entry);
}
public void CopyTo (DirectoryServicesPermissionEntry[] copy_to, int index)
{
foreach (DirectoryServicesPermissionEntry entry in List)
copy_to[index++] = entry;
}
public bool Contains (DirectoryServicesPermissionEntry entry)
{
return List.Contains (entry);
}
public int IndexOf (DirectoryServicesPermissionEntry entry)
{
return List.IndexOf (entry);
}
public void Insert (int pos, DirectoryServicesPermissionEntry entry)
{
List.Insert (pos, entry);
}
public void Remove (DirectoryServicesPermissionEntry entry)
{
List.Remove (entry);
}
protected override void OnClear ()
{
owner.ClearEntries ();
}
protected override void OnInsert (int index, object value)
{
owner.Add (value);
}
protected override void OnRemove (int index, object value)
{
owner.Remove (value);
}
protected override void OnSet (int index, object oldValue, object newValue)
{
owner.Remove (oldValue);
owner.Add (newValue);
}
}
}

View File

@@ -0,0 +1,78 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
using System.ComponentModel;
namespace System.DirectoryServices
{
public class DirectorySynchronization
{
[DefaultValue(DirectorySynchronizationOptions.None), DSDescription("DSDirectorySynchronizationFlag")]
public DirectorySynchronizationOptions Option {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
public DirectorySynchronization ()
{
}
public DirectorySynchronization (DirectorySynchronizationOptions option)
{
}
public DirectorySynchronization (DirectorySynchronization sync)
{
}
public DirectorySynchronization (byte[] cookie)
{
}
public DirectorySynchronization (DirectorySynchronizationOptions option, byte[] cookie)
{
}
public byte[] GetDirectorySynchronizationCookie ()
{
throw new NotImplementedException ();
}
public void ResetDirectorySynchronizationCookie ()
{
}
public void ResetDirectorySynchronizationCookie (byte[] cookie)
{
throw new NotImplementedException ();
}
public DirectorySynchronization Copy ()
{
throw new NotImplementedException ();
}
}
}

View File

@@ -0,0 +1,34 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
namespace System.DirectoryServices
{
[Flags]
public enum DirectorySynchronizationOptions : long
{
None = 0L,
ObjectSecurity = 1L,
ParentsFirst = 2048L,
PublicDataOnly = 8192L,
IncrementalValues = 2147483648L
}
}

View File

@@ -0,0 +1,126 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
using System.ComponentModel;
namespace System.DirectoryServices
{
public class DirectoryVirtualListView
{
[DefaultValue(0), DSDescription("DSBeforeCount")]
public int BeforeCount {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[DefaultValue(0), DSDescription("DSAfterCount")]
public int AfterCount {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[DefaultValue(0), DSDescription("DSOffset")]
public int Offset {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[DefaultValue(0), DSDescription("DSTargetPercentage")]
public int TargetPercentage {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[DefaultValue("")]
[TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
[DSDescription("DSTarget")]
public string Target {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[DefaultValue(0), DSDescription("DSApproximateTotal")]
public int ApproximateTotal {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[DefaultValue(null), DSDescription("DSDirectoryVirtualListViewContext")]
public DirectoryVirtualListViewContext DirectoryVirtualListViewContext {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
public DirectoryVirtualListView ()
{
}
public DirectoryVirtualListView (int afterCount)
{
}
public DirectoryVirtualListView (int beforeCount, int afterCount, int offset)
{
}
public DirectoryVirtualListView (int beforeCount, int afterCount, string target)
{
}
public DirectoryVirtualListView (int beforeCount, int afterCount, int offset, DirectoryVirtualListViewContext context)
{
}
public DirectoryVirtualListView (int beforeCount, int afterCount, string target, DirectoryVirtualListViewContext context)
{
}
}
}

View File

@@ -0,0 +1,36 @@
/******************************************************************************
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the Software), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*******************************************************************************/
using System;
namespace System.DirectoryServices
{
public class DirectoryVirtualListViewContext
{
public DirectoryVirtualListViewContext ()
{
}
public DirectoryVirtualListViewContext Copy ()
{
throw new NotImplementedException ();
}
}
}

Some files were not shown because too many files have changed in this diff Show More