本文整理汇总了C#中Principal.ResetAllChangeStatus方法的典型用法代码示例。如果您正苦于以下问题:C# Principal.ResetAllChangeStatus方法的具体用法?C# Principal.ResetAllChangeStatus怎么用?C# Principal.ResetAllChangeStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Principal
的用法示例。
在下文中一共展示了Principal.ResetAllChangeStatus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
internal override void Update(Principal p)
{
GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMStoreCtx", "Update");
Debug.Assert(p.fakePrincipal == false);
Debug.Assert(p.unpersisted == false);
Debug.Assert(p.UnderlyingObject != null);
Debug.Assert(p.UnderlyingObject is DirectoryEntry);
try
{
// Commit the properties
SDSUtils.ApplyChangesToDirectory(
p,
this,
new SDSUtils.GroupMembershipUpdater(UpdateGroupMembership),
_credentials,
_authTypes
);
// Reset the change tracking
p.ResetAllChangeStatus();
}
catch (System.Runtime.InteropServices.COMException e)
{
throw ExceptionHelper.GetExceptionFromCOMException(e);
}
}
示例2: Update
internal override void Update(Principal p)
{
try
{
SDSUtils.ApplyChangesToDirectory(p, this, new SDSUtils.GroupMembershipUpdater(SAMStoreCtx.UpdateGroupMembership), this.credentials, this.authTypes);
p.ResetAllChangeStatus();
}
catch (COMException cOMException1)
{
COMException cOMException = cOMException1;
throw ExceptionHelper.GetExceptionFromCOMException(cOMException);
}
}
示例3: Insert
//
// CRUD
//
// Used to perform the specified operation on the Principal. They also make any needed security subsystem
// calls to obtain digitial signatures.
//
// Insert() and Update() must check to make sure no properties not supported by this StoreCtx
// have been set, prior to persisting the Principal.
internal override void Insert(Principal p)
{
Debug.Assert(p.unpersisted == true);
Debug.Assert(p.fakePrincipal == false);
try
{
// Insert the principal into the store
SDSUtils.InsertPrincipal(
p,
this,
new SDSUtils.GroupMembershipUpdater(UpdateGroupMembership),
_credentials,
_authTypes,
false // handled in PushChangesToNative
);
// Load in all the initial values from the store
((DirectoryEntry)p.UnderlyingObject).RefreshCache();
// Load in the StoreKey
Debug.Assert(p.Key == null); // since it was previously unpersisted
Debug.Assert(p.UnderlyingObject != null); // since we just persisted it
Debug.Assert(p.UnderlyingObject is DirectoryEntry);
DirectoryEntry de = (DirectoryEntry)p.UnderlyingObject;
// We just created a principal, so it should have an objectSid
Debug.Assert((de.Properties["objectSid"] != null) && (de.Properties["objectSid"].Count == 1));
SAMStoreKey key = new SAMStoreKey(
this.MachineFlatName,
(byte[])de.Properties["objectSid"].Value
);
p.Key = key;
// Reset the change tracking
p.ResetAllChangeStatus();
GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMStoreCtx", "Insert: new SID is ", Utils.ByteArrayToString((byte[])de.Properties["objectSid"].Value));
}
catch (System.Runtime.InteropServices.COMException e)
{
throw ExceptionHelper.GetExceptionFromCOMException(e);
}
}
示例4: Insert
internal override void Insert(Principal p)
{
try
{
SDSUtils.InsertPrincipal(p, this, new SDSUtils.GroupMembershipUpdater(SAMStoreCtx.UpdateGroupMembership), this.credentials, this.authTypes, false);
((DirectoryEntry)p.UnderlyingObject).RefreshCache();
DirectoryEntry underlyingObject = (DirectoryEntry)p.UnderlyingObject;
SAMStoreKey sAMStoreKey = new SAMStoreKey(this.MachineFlatName, (byte[])underlyingObject.Properties["objectSid"].Value);
p.Key = sAMStoreKey;
p.ResetAllChangeStatus();
}
catch (COMException cOMException1)
{
COMException cOMException = cOMException1;
throw ExceptionHelper.GetExceptionFromCOMException(cOMException);
}
}