예제 #1
0
 /// <summary>
 /// <para>Initalize a new instance of the <see cref="StorageProviderNode"/> with the runtime configuration data.</para>
 /// </summary>
 /// <param name="data">
 /// <para>The runtime data for the storage provider..</para>
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// <para><paramref name="data"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 protected StorageProviderNode(StorageProviderData data) : base()
 {
     if (data == null)
     {
         throw new ArgumentNullException("data");
     }
     this.storageProviderData = data;
 }
예제 #2
0
 /// <summary>
 /// <para>Initalize a new instance of the <see cref="StorageProviderNode"/> with the runtime configuration data.</para>
 /// </summary>
 /// <param name="data">
 /// <para>The runtime data for the storage provider..</para>
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// <para><paramref name="data"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 protected StorageProviderNode(StorageProviderData data)
     : base()
 {
     if (data == null)
     {
         throw new ArgumentNullException("data");
     }
     this.storageProviderData = data;
 }
예제 #3
0
        /// <summary>
        /// <para>Initializes this provider to the correct state and context used by the factory creating it.</para>
        /// </summary>
        /// <param name="configurationView">
        /// <para>The cursor to use to get the data specific for the transformer.</para>
        /// </param>
        /// <exception cref="ArgumentException">
        /// <para><paramref name="configurationView"/> must be of type <see cref="EnterpriseLibrary.Configuration.RuntimeConfigurationView"/>.</para>
        /// <para>- or -</para>
        /// <para>The <see cref="StorageProviderData"/> from the cursor should be of type <see cref="XmlFileStorageProviderData"/>.</para>
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <para><paramref name="configurationView"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
        /// </exception>
        public override void Initialize(ConfigurationView configurationView)
        {
            ArgumentValidation.CheckForNullReference(configurationView, "configurationView");

            GetStorageCursor(configurationView);
            StorageProviderData storageProviderData = runtimeConfigurationView.GetStorageProviderData(CurrentSectionName);

            ArgumentValidation.CheckExpectedType(storageProviderData, typeof(XmlFileStorageProviderData));

            XmlFileStorageProviderData xmlFileStorageProvider = (XmlFileStorageProviderData)storageProviderData;

            SetCurrentDirectory(runtimeConfigurationView);
            SetApplicationDocumentPathSetting(xmlFileStorageProvider);
        }
 /// <summary>
 /// <para>Adds an <see cref="StorageProviderData"/> into the collection.</para>
 /// </summary>
 /// <param name="storageProviderData">
 /// <para>The <see cref="StorageProviderData"/> to add. The value can not be a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </param>
 /// <remarks>
 /// <para>If a reference already exists in the collection by <seealso cref="ProviderData.Name"/>, it will be replaced with the new reference.</para>
 /// </remarks>
 /// <exception cref="System.ArgumentNullException">
 /// <para><paramref name="storageProviderData"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 /// <exception cref="System.InvalidOperationException">
 /// <para><seealso cref="ProviderData.Name"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 public void Add(StorageProviderData storageProviderData)
 {
     base.AddProvider(storageProviderData);
 }
예제 #5
0
 protected MyAbstractDerivedNode(StorageProviderData storageProviderData) : base(storageProviderData)
 {
 }
예제 #6
0
 protected MyAbstractDerivedNode(StorageProviderData storageProviderData)
     : base(storageProviderData)
 {
 }
 /// <summary>
 /// <para>Adds an <see cref="StorageProviderData"/> into the collection.</para>
 /// </summary>
 /// <param name="storageProviderData">
 /// <para>The <see cref="StorageProviderData"/> to add. The value can not be a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </param>
 /// <remarks>
 /// <para>If a reference already exists in the collection by <seealso cref="ProviderData.Name"/>, it will be replaced with the new reference.</para>
 /// </remarks>
 /// <exception cref="System.ArgumentNullException">
 /// <para><paramref name="storageProviderData"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 /// <exception cref="System.InvalidOperationException">
 /// <para><seealso cref="ProviderData.Name"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 public void Add(StorageProviderData storageProviderData)
 {
     base.AddProvider(storageProviderData);
 }
 /// <summary>
 /// <para>Copies the entire <see cref="StorageProviderDataCollection"/> to a compatible one-dimensional <see cref="StorageProviderData"/> array, starting at the specified index of the target array.</para>
 /// </summary>
 /// <param name="array">
 /// <para>The one-dimensional <see cref="StorageProviderData"/> array that is the destination of the elements copied from <see cref="StorageProviderDataCollection"/>. The <see cref="StorageProviderData"/> array must have zero-based indexing.</para>
 /// </param>
 /// <param name="index">
 /// <para>The zero-based index in array at which copying begins.</para>
 /// </param>
 public void CopyTo(StorageProviderData[] array, int index)
 {
     for (IEnumerator e = this.GetEnumerator(); e.MoveNext(); )
     {
         array.SetValue(e.Current, index++);
     }
 }