System.Deployment.Internal.Isolation.StoreTransaction.Add C# (CSharp) Method

Add() public method

public Add ( StoreOperationStageComponentFile o ) : void
o StoreOperationStageComponentFile
return void
        public void Add(StoreOperationStageComponentFile o)
        {
            this._list.Add(o);
        }

Same methods

StoreTransaction::Add ( StoreOperationInstallDeployment o ) : void
StoreTransaction::Add ( StoreOperationPinDeployment o ) : void
StoreTransaction::Add ( StoreOperationScavenge o ) : void
StoreTransaction::Add ( StoreOperationSetCanonicalizationContext o ) : void
StoreTransaction::Add ( StoreOperationSetDeploymentMetadata o ) : void
StoreTransaction::Add ( StoreOperationStageComponent o ) : void
StoreTransaction::Add ( StoreOperationUninstallDeployment o ) : void
StoreTransaction::Add ( System.Deployment.Internal.Isolation.StoreOperationUnpinDeployment o ) : void

Usage Example

コード例 #1
0
        private void CommitApplicationTrust(ApplicationIdentity applicationIdentity, string trustXml) { 
            StoreOperationMetadataProperty[] properties = new StoreOperationMetadataProperty[] {
                    new StoreOperationMetadataProperty(ClrPropertySet, ApplicationTrustProperty, trustXml) 
                }; 

            IEnumDefinitionIdentity idenum = applicationIdentity.Identity.EnumAppPath(); 
            IDefinitionIdentity[] asbId = new IDefinitionIdentity[1];
            IDefinitionIdentity deplId = null;
            if (idenum.Next(1, asbId) == 1)
                deplId = asbId[0]; 

            IDefinitionAppId defAppId = IsolationInterop.AppIdAuthority.CreateDefinition(); 
            defAppId.SetAppPath(1, new IDefinitionIdentity[] {deplId}); 
            defAppId.put_Codebase(applicationIdentity.CodeBase);
 
            using (StoreTransaction storeTxn = new StoreTransaction()) {
                storeTxn.Add(new StoreOperationSetDeploymentMetadata(defAppId, InstallReference, properties));
                RefreshStorePointer();
                m_pStore.Transact(storeTxn.Operations); 
            }
 
            m_appTrusts = null; // reset the app trusts in the collection. 
        }
All Usage Examples Of System.Deployment.Internal.Isolation.StoreTransaction::Add