本文整理汇总了C#中Export类的典型用法代码示例。如果您正苦于以下问题:C# Export类的具体用法?C# Export怎么用?C# Export使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Export类属于命名空间,在下文中一共展示了Export类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExportDialog
public ExportDialog(ISequence sequence)
{
InitializeComponent();
ForeColor = ThemeColorTable.ForeColor;
BackColor = ThemeColorTable.BackgroundColor;
ThemeUpdateControls.UpdateControls(this);
Icon = Resources.Icon_Vixen3;
_sequence = sequence;
_exportOps = new Export();
_exportOps.SequenceNotify += SequenceNotify;
_sequenceFileName = _sequence.FilePath;
IEnumerable<string> mediaFileNames =
(from media in _sequence.SequenceData.Media
where media.GetType().ToString().Contains("Audio")
where media.MediaFilePath.Length != 0
select media.MediaFilePath);
_audioFileName = "";
if (mediaFileNames.Count() > 0)
{
_audioFileName = mediaFileNames.First();
}
exportProgressBar.Visible = false;
currentTimeLabel.Visible = false;
_cancelled = false;
backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
backgroundWorker1.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker1_ProgressChanged);
}
示例2: ForceFieldExport
public ForceFieldExport(Configuration config, Export source, Type typeToProxy)
: base(source.Definition, () => null)
{
_config = config;
_source = source;
_typeToProxy = typeToProxy;
}
示例3: Main
/// <summary>
/// The main entry point for the application.
/// </summary>
private static void Main(string[] args)
{
XmlConfigurator.Configure();
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
var log = LogManager.GetLogger("VSSyncExportService"); //new LocalLog(GetLogFileName());
try
{
#if DEBUG
var tms = new Export {Log = log};
tms.Execute();
while (true)
{
Thread.Sleep(10000);
}
#else
log.Info("VSSync Export Service running...");
var export = new Export { Log = log };
var servicesToRun = new ServiceBase[]
{
export
};
ServiceBase.Run(servicesToRun);
#endif
}
catch (Exception ex)
{
log.Error("Service error.", ex);
}
}
示例4: UndoExportProvider
internal UndoExportProvider()
{
_textUndoHistoryRegistryContractName = AttributedModelServices.GetContractName(typeof(ITextUndoHistoryRegistry));
_basicUndoHistoryRegistryContractName = AttributedModelServices.GetContractName(typeof(IBasicUndoHistoryRegistry));
_basicUndoHistoryRegistry = EditorUtilsFactory.CreateBasicUndoHistoryRegistry();
_export = new Export(_textUndoHistoryRegistryContractName, () => _basicUndoHistoryRegistry);
}
示例5: GetExportedValueCore
protected override object GetExportedValueCore()
{
if (this._export == null)
{
// Need to create a new scopedefinition that is filtered by the ExportProvider
var filteredScopeDefinition = new CompositionScopeDefinition(
new FilteredCatalog(this._scopeFactoryExport._catalog, this._catalogFilter),
this._scopeFactoryExport._catalog.Children);
var childContainer = this._scopeFactoryExport._scopeManager.CreateChildContainer(filteredScopeDefinition);
var export = childContainer.CatalogExportProvider.CreateExport(this._scopeFactoryExport.UnderlyingPartDefinition, this._scopeFactoryExport.UnderlyingExportDefinition, false, CreationPolicy.Any);
lock (this._lock)
{
if (this._export == null)
{
this._childContainer = childContainer;
Thread.MemoryBarrier();
this._export = export;
childContainer = null;
export = null;
}
}
if (childContainer != null)
{
childContainer.Dispose();
}
}
return this._export.Value;
}
示例6: CreateExport
/// <summary>
/// Create an Export
/// </summary>
/// <param name="fields"></param>
/// <param name="destinationUri"></param>
/// <param name="filter"> </param>
/// <returns>The URI for the export</returns>
public string CreateExport(Dictionary<string, string> fields, string destinationUri, ExportFilter filter)
{
Export export = new Export
{
name = "sample export",
fields = fields,
filter = filter,
secondsToAutoDelete = 3600,
secondsToRetainData = 3600,
syncActions = new List<SyncAction>
{
new SyncAction
{
action = SyncActionType.add,
destinationUri = destinationUri
}
}
};
RestRequest request = new RestRequest(Method.POST)
{
Resource = "/contact/export",
RequestFormat = DataFormat.Json,
RootElement = "export"
};
request.AddBody(export);
IRestResponse<Export> response = _client.Execute<Export>(request);
Export returnedExport = response.Data;
return returnedExport.uri;
}
示例7: MefScopedCompositionContext
/// <summary>
/// Initializes a new instance of the <see cref="MefScopedCompositionContext"/> class.
/// </summary>
/// <param name="export">The export.</param>
public MefScopedCompositionContext(Export<CompositionContext> export)
{
Contract.Requires(export != null);
this.export = export;
this.Initialize(this.export.Value);
}
示例8: Main
static void Main()
{
try
{
if (!Directory.Exists(Settings.Default.GAME_PATH))
{
throw new FileNotFoundException("Specify correct WoT root folder");
}
List<Vehicle> vehicles = new List<Vehicle>();
foreach (string country in Defines.COUNTRIES)
{
vehicles.AddRange(ListXmlParser.getVehicleByNation(country));
}
Export exporter = new Export(vehicles);
exporter.genVehicleInfoData2();
exporter.genVehicleInfoData2AS3();
exporter.genVehicleNames();
//exporter.genVehicleInfoData(); need resolve sortNames & special matchmaking definition
}
catch (Exception ex)
{
Console.WriteLine("Error:\n" + ex);
}
#if DEBUG
Console.WriteLine("Press any key to close...");
Console.ReadKey();
#endif
}
示例9: TryInjectingServicesToVM
protected virtual void TryInjectingServicesToVM(Export vmExport, object vm, object containerContext)
{
var services = (IEnumerable<Type>)vmExport.Metadata[ExportViewModel.ContextAwareServicesProperty];
var serviceConsumerVM = vm as IServiceConsumer;
if (serviceConsumerVM != null && services != null) // then we should feed the view model with these services
{
foreach (var serviceType in services)
{
//Get services from the MEFComposition
Export serviceExport = resolver.GetServiceByContract(serviceType);
if (serviceExport != null)
{
serviceConsumerVM.ServiceLocator.RegisterService(serviceExport.Value, serviceType);
InjectContext(serviceExport, containerContext);
}
else
{
Debug.WriteLine("Cannot find export for service : " + serviceType.FullName);
}
}
serviceConsumerVM.OnServicesInjected();
}
}
示例10: Constructor2_DefinitionAsDefinitionArgument_ShouldSetDefinitionProperty
public void Constructor2_DefinitionAsDefinitionArgument_ShouldSetDefinitionProperty()
{
var definition = ExportDefinitionFactory.Create();
var export = new Export(definition, () => null);
Assert.AreSame(definition, export.Definition);
}
示例11: PerformExport
public async Task PerformExport()
{
Export ex = new Export();
await ex.ExportToCachebox(_gcList,
Core.Settings.Default.CacheboxTargetFolder,
Core.Settings.Default.CacheboxMaxLogCount);
Close();
}
示例12: CastSingleExportToImportType
private object CastSingleExportToImportType(Type type, Export export)
{
if (this.ImportType.CastExport != null)
{
return this.ImportType.CastExport(export);
}
return Cast(type, export);
}
示例13: Add
public static void Add(this ComponentCollection<IdentitySource> collection,
string name,
IdentitySource source)
{
Dictionary<string, object> metadata = new Dictionary<string, object>();
metadata.Add("Name", name);
var export = new Export<IdentitySource, ComponentMetadata>(metadata, () => source);
collection.Add(export);
}
示例14: GetExportsCore
protected override IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
{
if (typeof(OliveOil).FullName != definition.ContractName)
{
return Enumerable.Empty<Export>();
}
var export = new Export(definition.ContractName, () => new OliveOil());
return new[] { export };
}
示例15: GetValue
private object GetValue(Export innerExport)
{
var value = innerExport.Value;
var context = value as IContextAware;
if (context != null)
{
context.InjectContext(_context);
}
return value;
}