本文整理汇总了C#中Candle类的典型用法代码示例。如果您正苦于以下问题:C# Candle类的具体用法?C# Candle怎么用?C# Candle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Candle类属于命名空间,在下文中一共展示了Candle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PayloadEmptySourceFileAttribute
public void PayloadEmptySourceFileAttribute()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(PayloadTests.TestDataDirectory, @"PayloadEmptySourceFileAttribute\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(6, "The Payload/@SourceFile attribute's value cannot be an empty string. If you want the value to be null or empty, simply remove the entire attribute.", Message.MessageTypeEnum.Error));
candle.ExpectedExitCode = 6;
candle.Run();
}
示例2: Start
// Use this for initialization
void Start()
{
candle1 = GameObject.Find ("Candle1").GetComponent<Candle> ();
candle2 = GameObject.Find ("Candle2").GetComponent<Candle> ();
candle3 = GameObject.Find ("Candle3").GetComponent<Candle> ();
candle4 = GameObject.Find ("Candle4").GetComponent<Candle> ();
state = 0;
}
示例3: ComponentSearchGuidMissing
public void ComponentSearchGuidMissing()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(ComponentSearchTests.TestDataDirectory, @"ComponentSearchGuidMissing\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(10, "The util:ComponentSearch/@Guid attribute was not found; it is required.", Message.MessageTypeEnum.Error));
candle.ExpectedExitCode = 10;
candle.Extensions.Add("WixUtilExtension");
candle.Run();
}
示例4: DirectorySearchInvalidPath
public void DirectorySearchInvalidPath()
{
string sourceFile = Path.Combine(DirectorySearchTests.TestDataDirectory, @"DirectorySearchInvalidPath\Product.wxs");
Candle candle = new Candle();
candle.SourceFiles.Add(sourceFile);
candle.Extensions.Add("WixUtilExtension");
candle.ExpectedWixMessages.Add(new WixMessage(346, "The util:DirectorySearch/@Path attribute's value, '%windir%\\System|*32', is not a valid relative long name because it contains illegal characters. Legal relative long names contain no more than 260 characters and must contain at least one non-period character. Any character except for the follow may be used: ? | > < : / * \".", Message.MessageTypeEnum.Error));
candle.ExpectedExitCode = 346;
candle.Run();
}
示例5: Main
static void Main(string[] args)
{
var zoneDetector = new ZoneDetector();
var detector = new KangarooTailDetector(zoneDetector);
detector.Start();
var firstCandle = new Candle();
detector.AddNewCandle(firstCandle);
var secondCandle = new Candle();
detector.AddNewCandle(secondCandle);
}
示例6: AddNewCandle
public void AddNewCandle(Candle candle)
{
if (_previousCandle == null)
{
_previousCandle = candle;
_currentCandle = candle;
return;
}
_previousCandle = _currentCandle;
_currentCandle = candle;
AnalyzeKangarooTailFormation();
}
示例7: AddNewCandle
public void AddNewCandle(Candle candle)
{
if (_previousCandle == null)
{
_previousCandle = candle;
_currentCandle = candle;
return;
}
_previousCandle = _currentCandle;
_currentCandle = candle;
AnalyzeBigShadowFormation();
}
示例8: ExampleTest2
public void ExampleTest2()
{
// Compile a wxs file
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(this.TestContext.DataDirectory, @"Examples\ExampleTest2\product.wxs"));
candle.Run();
// Create a Light object that uses some properties of the Candle object
Light light = new Light(candle);
// Define the Light warning that we expect to see
WixMessage LGHT1079 = new WixMessage(1079, WixMessage.MessageTypeEnum.Warning);
light.ExpectedWixMessages.Add(LGHT1079);
// Link
light.Run();
// Query the resulting MSI for verification
string query = "SELECT `Value` FROM `Property` WHERE `Property` = 'Manufacturer'";
Verifier.VerifyQuery(light.OutputFile, query, "Microsoft Corporation");
}
示例9: Activate
public void Activate(float speed, Vector3 distance, Vector3 aftaDistance, float afterWait, Candle resetCandle) {
if (transform.position == distance + originalPosition)
resetCandle.ResetActivation(true);
else {
if (this.resetCandle != null)
this.resetCandle.ResetActivation(aftaDistances[aftaDistances.Count - 1] == Vector3.zero);
this.resetCandle = resetCandle;
this.speed = speed;
this.afterWait = afterWait;
this.distance = distance;
finalPos = distance + transform.position;
if (aftaDistance != Vector3.zero)
moveBacks.Add(aftaDistance + finalPos);
aftaDistances.Add(aftaDistance);
originalPosition = transform.position;
sign = distance.normalized;
Debug.Log(aftaSign = aftaDistance.normalized);
}
}
示例10: AddValue
/// <summary>
/// To add data for the candle.
/// </summary>
/// <param name="series">Candles series.</param>
/// <param name="candle">The candle for which you need to add data.</param>
/// <param name="value">New data.</param>
public void AddValue(CandleSeries series, Candle candle, ICandleBuilderSourceValue value)
{
if (_valuesKeepTime == TimeSpan.Zero)
return;
GetInfo(series).AddValue(candle, value);
}
示例11: GetValues
public IEnumerable<ICandleBuilderSourceValue> GetValues(Candle candle)
{
if (candle == null)
throw new ArgumentNullException("candle");
var trades = _candleValues.TryGetValue(candle);
return trades != null ? trades.SyncGet(c => c.ToArray()) : Enumerable.Empty<ICandleBuilderSourceValue>();
}
示例12: BuildPatch
/// <summary>
/// Builds a patch using given paths for the target and upgrade packages.
/// </summary>
/// <param name="targetPath">The path to the target MSI.</param>
/// <param name="upgradePath">The path to the upgrade MSI.</param>
/// <param name="name">The name of the patch to build.</param>
/// <param name="version">Optional version for the bundle.</param>
/// <returns>The path to the patch.</returns>
private string BuildPatch(string targetPath, string upgradePath, string name, string version)
{
// Get the name of the calling method.
StackTrace stack = new StackTrace();
string caller = stack.GetFrame(1).GetMethod().Name;
// Create paths.
string source = Path.Combine(this.TestContext.TestDataDirectory, String.Concat(name, ".wxs"));
string rootDirectory = FileUtilities.GetUniqueFileName();
string objDirectory = Path.Combine(rootDirectory, Settings.WixobjFolder);
string msiDirectory = Path.Combine(rootDirectory, Settings.MsiFolder);
string wixmst = Path.Combine(objDirectory, String.Concat(name, ".wixmst"));
string wixmsp = Path.Combine(objDirectory, String.Concat(name, ".wixmsp"));
string package = Path.Combine(msiDirectory, String.Concat(name, ".msp"));
// Add the root directory to be cleaned up.
this.TestArtifacts.Add(new DirectoryInfo(rootDirectory));
// Compile.
Candle candle = new Candle();
candle.Extensions.AddRange(DependencyExtensionTests.Extensions);
candle.OtherArguments = String.Concat("-dTestName=", caller);
if (!String.IsNullOrEmpty(version))
{
candle.OtherArguments = String.Concat(candle.OtherArguments, " -dVersion=", version);
}
candle.OutputFile = String.Concat(objDirectory, @"\");
candle.SourceFiles.Add(source);
candle.WorkingDirectory = this.TestContext.TestDataDirectory;
candle.Run();
// Make sure the output directory is cleaned up.
this.TestArtifacts.Add(new DirectoryInfo(objDirectory));
// Link.
Light light = new Light();
light.Extensions.AddRange(DependencyExtensionTests.Extensions);
light.ObjectFiles = candle.ExpectedOutputFiles;
light.OutputFile = wixmsp;
light.SuppressMSIAndMSMValidation = true;
light.WorkingDirectory = this.TestContext.TestDataDirectory;
light.Run();
// Make sure the output directory is cleaned up.
this.TestArtifacts.Add(new DirectoryInfo(msiDirectory));
// Torch.
Torch torch = new Torch();
torch.TargetInput = Path.ChangeExtension(targetPath, "wixpdb");
torch.UpdatedInput = Path.ChangeExtension(upgradePath, "wixpdb");
torch.PreserveUnmodified = true;
torch.XmlInput = true;
torch.OutputFile = wixmst;
torch.WorkingDirectory = this.TestContext.TestDataDirectory;
torch.Run();
// Pyro.
Pyro pyro = new Pyro();
pyro.Baselines.Add(torch.OutputFile, name);
pyro.InputFile = light.OutputFile;
pyro.OutputFile = package;
pyro.WorkingDirectory = this.TestContext.TestDataDirectory;
pyro.SuppressWarnings.Add("1079");
pyro.Run();
return pyro.OutputFile;
}
示例13: RegistrySearchInvalidRootValue
public void RegistrySearchInvalidRootValue()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(RegistrySearchTests.TestDataDirectory, @"RegistrySearchInvalidRootValue\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(21, "The util:RegistrySearch/@Root attribute's value, 'HKEY_LOCAL_MACHINE', is not one of the legal options: 'HKCR', 'HKCU', 'HKLM', or 'HKU'.", Message.MessageTypeEnum.Error));
candle.ExpectedWixMessages.Add(new WixMessage(10, "The util:RegistrySearch/@Root attribute was not found; it is required.", Message.MessageTypeEnum.Error));
candle.ExpectedExitCode = 10;
candle.Extensions.Add("WixUtilExtension");
candle.Run();
}
示例14: ComponentSearchInvalidResultValue
public void ComponentSearchInvalidResultValue()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(ComponentSearchTests.TestDataDirectory, @"ComponentSearchInvalidResultValue\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(21, "The util:ComponentSearch/@Result attribute's value, 'NotState', is not one of the legal options: 'Directory', 'State', or 'KeyPath'.", Message.MessageTypeEnum.Error));
candle.ExpectedExitCode = 21;
candle.Extensions.Add("WixUtilExtension");
candle.Run();
}
示例15: PackageSourceFileMissing
public void PackageSourceFileMissing()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(PackageTests.TestDataDirectory, @"PackageSourceFileMissing\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(10, "The MsiPackage/@SourceFile attribute was not found; it is required.", Message.MessageTypeEnum.Error));
candle.ExpectedWixMessages.Add(new WixMessage(10, "The MspPackage/@SourceFile attribute was not found; it is required.", Message.MessageTypeEnum.Error));
candle.ExpectedWixMessages.Add(new WixMessage(10, "The MsuPackage/@SourceFile attribute was not found; it is required.", Message.MessageTypeEnum.Error));
candle.ExpectedWixMessages.Add(new WixMessage(10, "The ExePackage/@SourceFile attribute was not found; it is required.", Message.MessageTypeEnum.Error));
candle.ExpectedExitCode = 10;
candle.Run();
}