本文整理汇总了C#中Candle类的典型用法代码示例。如果您正苦于以下问题:C# Candle类的具体用法?C# Candle怎么用?C# Candle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Candle类属于命名空间,在下文中一共展示了Candle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:bleissem,项目名称:wix3,代码行数:8,代码来源:Bundle.PayloadTests.cs
示例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;
}
开发者ID:joshviss,项目名称:CandyJam,代码行数:10,代码来源:Level2Gate.cs
示例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();
}
开发者ID:zooba,项目名称:wix3,代码行数:9,代码来源:Bundle.ComponentSearchTests.cs
示例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();
}
开发者ID:zooba,项目名称:wix3,代码行数:11,代码来源:Bundle.DirectorySearchTests.cs
示例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);
}
开发者ID:jorik041,项目名称:nakedfx,代码行数:13,代码来源:Program.cs
示例6: AddNewCandle
public void AddNewCandle(Candle candle)
{
if (_previousCandle == null)
{
_previousCandle = candle;
_currentCandle = candle;
return;
}
_previousCandle = _currentCandle;
_currentCandle = candle;
AnalyzeKangarooTailFormation();
}
开发者ID:jorik041,项目名称:nakedfx,代码行数:14,代码来源:KangarooTailDetector.cs
示例7: AddNewCandle
public void AddNewCandle(Candle candle)
{
if (_previousCandle == null)
{
_previousCandle = candle;
_currentCandle = candle;
return;
}
_previousCandle = _currentCandle;
_currentCandle = candle;
AnalyzeBigShadowFormation();
}
开发者ID:jorik041,项目名称:nakedfx,代码行数:14,代码来源:BigShadowDetector.cs
示例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");
}
开发者ID:bleissem,项目名称:wix3,代码行数:21,代码来源:ExampleTests.cs
示例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);
}
}
开发者ID:dustinpeerce,项目名称:ggj2016-ritual,代码行数:23,代码来源:Movable.cs
示例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);
}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:13,代码来源:CandleBuilderContainer.cs
示例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>();
}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:8,代码来源:CandleBuilderContainer.cs
示例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;
}
开发者ID:zooba,项目名称:wix3,代码行数:75,代码来源:DependencyExtension.DependencyExtensionTests.cs
示例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();
}
开发者ID:Jeremiahf,项目名称:wix3,代码行数:10,代码来源:Bundle.RegistrySearchTests.cs
示例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();
}
开发者ID:zooba,项目名称:wix3,代码行数:9,代码来源:Bundle.ComponentSearchTests.cs
示例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();
}
开发者ID:zooba,项目名称:wix3,代码行数:11,代码来源:Bundle.PackageTests.cs
示例16: PackageInvalidName
public void PackageInvalidName()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(PackageTests.TestDataDirectory, @"PackageInvalidName\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(346, "The MsiPackage/@Name attribute's value, 'MsiPackage|*?.msi', 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.ExpectedWixMessages.Add(new WixMessage(346, "The MspPackage/@Name attribute's value, 'MspPackage|*?.msp', 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.ExpectedWixMessages.Add(new WixMessage(346, "The MsuPackage/@Name attribute's value, 'MsuPackage|*?.msu', 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.ExpectedWixMessages.Add(new WixMessage(346, "The ExePackage/@Name attribute's value, 'ExePackage|*?.exe', 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();
}
开发者ID:zooba,项目名称:wix3,代码行数:11,代码来源:Bundle.PackageTests.cs
示例17: VariableValueMissing
public void VariableValueMissing()
{
Candle candle = new Candle();
candle.SourceFiles.Add(Path.Combine(VariableTests.TestDataDirectory, @"VariableValueMissing\Product.wxs"));
candle.ExpectedWixMessages.Add(new WixMessage(10, "The Variable/@Value attribute was not found; it is required.", Message.MessageTypeEnum.Error));
candle.ExpectedExitCode = 10;
candle.Run();
}
开发者ID:bleissem,项目名称:wix3,代码行数:8,代码来源:Bundle.VariableTests.cs
示例18: Candle_OnCandleExtinguished
void Candle_OnCandleExtinguished(Candle sender)
{
// Damn! Gotta put it back in place!
// Also punish the player
correct_sequence.Add(sender);
Summoner.sngl.ExtinguishedCandle();
}
开发者ID:thk123,项目名称:WizardsRitual,代码行数:9,代码来源:CandlePatternGenerator.cs
示例19: HighlightCandle
void HighlightCandle(Candle next_candle)
{
if(CurrentMarker == null)
{
CurrentMarker = Instantiate(NextCandlePrefab);
}
CurrentMarker.transform.parent = next_candle.transform;
CurrentMarker.transform.localPosition = Vector3.zero;
CurrentMarker.GetComponent<Animator> ().SetTrigger ("zoom_in");
}
开发者ID:thk123,项目名称:WizardsRitual,代码行数:11,代码来源:CandlePatternGenerator.cs
示例20: Candle_OnCandleLit
void Candle_OnCandleLit(Candle sender)
{
if(correct_sequence[0] == sender)
{
sender.CorrectCandle();
correct_sequence.RemoveAt(0);
Summoner.sngl.CorrectCandle();
if(correct_sequence.Count > 0)
{
HighlightCandle(correct_sequence[0]);
}
}
else
{
int i = correct_sequence.FindIndex(c => c == sender);
// Remove the candle from the sequence, at this point...
if (i < 0)
return;
correct_sequence.RemoveAt(i);
Summoner.sngl.WrongCandleLit();
sender.IncorrectCandle();
}
if (correct_sequence.Count == 0)
{
// Also hide highligher
if (CurrentMarker != null)
CurrentMarker.SetActive(false);
Summoner.sngl.Summon();
}
}
开发者ID:thk123,项目名称:WizardsRitual,代码行数:31,代码来源:CandlePatternGenerator.cs
注:本文中的Candle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论