示例#1
0
        /// <summary>Loads the assembly package.</summary>
        /// <remarks>This method is expected to be called only once. Call <see cref="CheckUpdate"/>
        /// afterward.</remarks>
        public void LoadPackage()
        {
            var buffer = _blobs.GetBlob <byte[]>(ContainerName, PackageBlobName, out _lastPackageEtag, _runtimeSerializer);

            _lastPackageCheck = DateTimeOffset.UtcNow;

            // if no assemblies have been loaded yet, just skip the loading
            if (!buffer.HasValue)
            {
                return;
            }

            var reader  = new CloudApplicationPackageReader();
            var package = reader.ReadPackage(buffer.Value, false);

            package.LoadAssemblies();
        }
示例#2
0
        /// <summary>Loads the assembly package.</summary>
        /// <remarks>This method is expected to be called only once. Call <see cref="CheckUpdate"/>
        /// afterward.</remarks>
        public void LoadPackage()
        {
            var buffer = _provider.GetBlob<byte[]>(ContainerName, PackageBlobName, out _lastPackageEtag);
            _lastPackageCheck = DateTimeOffset.UtcNow;

            // if no assemblies have been loaded yet, just skip the loading
            if (!buffer.HasValue)
            {
                return;
            }

            var reader = new CloudApplicationPackageReader();
            var package = reader.ReadPackage(buffer.Value, false);

            package.LoadAssemblies();
        }