本文整理汇总了C#中IPath类的典型用法代码示例。如果您正苦于以下问题:C# IPath类的具体用法?C# IPath怎么用?C# IPath使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPath类属于命名空间,在下文中一共展示了IPath类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetBrotherFileWithName
internal static IFilePath GetBrotherFileWithName(IPath path, string fileName)
{
Debug.Assert(path != null);
Debug.Assert(fileName != null); // Enforced by contract
Debug.Assert(fileName.Length > 0); // Enforced by contract
return path.ParentDirectoryPath.GetChildFileWithName(fileName);
}
开发者ID:berkeleybross,项目名称:FileSystem,代码行数:7,代码来源:PathHelpers+PathBrowsingHelpers.cs
示例2: ChangeUnitLocation
private void ChangeUnitLocation(IPath pathToTheTargetPlanet, IUnit unitToTeleport, ILocation targetLocation)
{
pathToTheTargetPlanet.TargetLocation.Planet.Units.Add(unitToTeleport);
unitToTeleport.CurrentLocation.Planet.Units.Remove(unitToTeleport);
unitToTeleport.PreviousLocation = unitToTeleport.CurrentLocation;
unitToTeleport.CurrentLocation = targetLocation;
}
开发者ID:Xristinaaaa,项目名称:Telerik2016,代码行数:7,代码来源:TeleportStation.cs
示例3: GetSisterFilePath
internal static IFilePath GetSisterFilePath(IPath path, string fileName)
{
Argument.IsNotNull(nameof(path), path);
Argument.IsNotNullOrEmpty(nameof(fileName), fileName);
return path.ParentDirectoryPath.GetChildFilePath(fileName);
}
开发者ID:ME3Explorer,项目名称:ME3Explorer,代码行数:7,代码来源:PathHelpers.PathBrowsingHelpers.cs
示例4: Axis
/// <summary>
/// Creates a new instance of the axis class
/// </summary>
/// <param name="path">That path to use</param>
public Axis(IPath path)
{
_valid = true;
_path = path;
SetPath(path);
}
开发者ID:MDSchechtman,项目名称:Aerotech-Motor-Sizer,代码行数:11,代码来源:Axis.cs
示例5: SelectableObject
public SelectableObject(Guid owner ,string name, IPath path)
{
m_Owner = owner;
m_Bounds = new Box(20.0, 20.0);
m_Name = name;
m_Path = path;
}
开发者ID:anthony-martin,项目名称:Triangles-in-space,代码行数:7,代码来源:SelectableObject.cs
示例6: SubOperation
internal SubOperation(MouseArea mc, IPath path)
{
this.currentGraph = null;
this.mouseAreaControl = null;
this.mouseAreaControl = mc;
this.CurrentGraph = path;
}
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:7,代码来源:SubOperation.cs
示例7: GetBrotherDirectoryWithName
internal static IDirectoryPath GetBrotherDirectoryWithName(IPath path, string directoryName)
{
Debug.Assert(path != null);
Debug.Assert(directoryName != null); // Enforced by contract
Debug.Assert(directoryName.Length > 0); // Enforced by contract
return path.ParentDirectoryPath.GetChildDirectoryWithName(directoryName);
}
开发者ID:berkeleybross,项目名称:FileSystem,代码行数:7,代码来源:PathHelpers+PathBrowsingHelpers.cs
示例8: GetSisterDirectoryPath
internal static IDirectoryPath GetSisterDirectoryPath(IPath path, string directoryName)
{
Argument.IsNotNull(nameof(path), path);
Argument.IsNotNullOrEmpty(nameof(directoryName), directoryName);
return path.ParentDirectoryPath.GetChildDirectoryPath(directoryName);
}
开发者ID:ME3Explorer,项目名称:ME3Explorer,代码行数:7,代码来源:PathHelpers.PathBrowsingHelpers.cs
示例9: PruneOperation
/// <summary>
/// Initializes a new instance of the <see cref="SelfMediaDatabase.Core.Operations.Prune.PruneOperation"/> class.
/// </summary>
/// <param name="directory">Injection wrapper of <see cref="System.IO.Directory"/>.</param>
/// <param name="file">Injection wrapper of <see cref="System.IO.File"/>.</param>
/// <param name="path">Injection wrapper of <see cref="System.IO.Path"/>.</param>
/// <param name="imageComparer">Image comparer.</param>
/// <param name="fileSystemHelper">Helper to access to files.</param>
public PruneOperation(
IDirectory directory,
IFile file,
IPath path,
IImageComparer imageComparer,
IFileSystemHelper fileSystemHelper,
IDialog dialog,
IRenameOperation renameOperation)
{
if (directory == null)
throw new ArgumentNullException("directory");
if (file == null)
throw new ArgumentNullException("file");
if (imageComparer == null)
throw new ArgumentNullException("imageComparer");
if (fileSystemHelper == null)
throw new ArgumentNullException("fileSystemHelper");
if (path == null)
throw new ArgumentNullException("path");
if (dialog == null)
throw new ArgumentNullException("dialog");
if (renameOperation == null)
throw new ArgumentNullException("renameOperation");
_directory = directory;
_file = file;
_path = path;
_imageComparer = imageComparer;
_fileSystemHelper = fileSystemHelper;
_dialog = dialog;
_renameOperation = renameOperation;
}
开发者ID:crabouif,项目名称:Self-Media-Database,代码行数:40,代码来源:PruneOperation.cs
示例10: Record
public Record(IPath path)
{
_time = path.Time;
_position = path.Position;
_velocity = path.Velocity;
_acceleration = path.Acceleration;
}
开发者ID:MDSchechtman,项目名称:Aerotech-Motor-Sizer,代码行数:7,代码来源:Record.cs
示例11: LinearPath
public LinearPath(IPath anotherPath, int sampleCount)
{
List<Vector3> pointList = new List<Vector3>(1000);
PathPosition pathPosition = anotherPath.getStartPoint();
float pathLength = 0f;
float remaining = 0f;
while (remaining == 0)
{
remaining = anotherPath.move(pathPosition, 0.01f, out pathPosition);
pathLength += 0.01f;
}
pathLength -= remaining;
distanceBetweenPoints = pathLength / sampleCount;
pathPosition = anotherPath.getStartPoint();
remaining = 0;
while (remaining == 0f)
{
pointList.Add(anotherPath.getLocalPosition(pathPosition));
remaining = anotherPath.move(pathPosition, distanceBetweenPoints, out pathPosition);
}
if (remaining < distanceBetweenPoints / 2f)
pointList[pointList.Count - 1] = anotherPath.getLocalPosition(anotherPath.getEndPoint());
else
pointList.Add(anotherPath.getLocalPosition(anotherPath.getEndPoint()));
points = pointList.ToArray();
}
开发者ID:btasdoven,项目名称:ScienceWars,代码行数:33,代码来源:LinearPath.cs
示例12: DefaultStayInLaneBehavior
/// <summary>
/// Gets a default behavior for a path segment
/// </summary>
/// <param name="location"></param>
/// <param name="vehicleState"></param>
/// <param name="exit"></param>
/// <param name="relative"></param>
/// <param name="stopSpeed"></param>
/// <param name="aMax"></param>
/// <param name="dt">timestep in seconds</param>
/// <returns></returns>
public static PathFollowingBehavior DefaultStayInLaneBehavior(RndfLocation location, VehicleState vehicleState,
RndfWaypointID action, ActionType actionType, bool relative, double stopSpeed, double aMax, double dt,
double maxSpeed, IPath path)
{
// get lane path
//IPath path = RoadToolkit.LanePath(location.Partition.FinalWaypoint.Lane, vehicleState, relative);
// check if the action is just a goal (note that exit and stop take precedence)
if (actionType == ActionType.Goal)
{
// get maximum speed
//double maxSpeed = location.Partition.FinalWaypoint.Lane.Way.Segment.SpeedInformation.MaxSpeed;
//double maxSpeed = maxV;
// generate path following behavior
//return new PathFollowingBehavior(path, new ScalarSpeedCommand(maxSpeed));
return null;
}
else
{
// get maximum speed
//double maxSpeed = location.Partition.FinalWaypoint.Lane.Way.Segment.SpeedInformation.MaxSpeed;
// get operational required distance to hand over to operational stop
double distance = RoadToolkit.DistanceUntilOperationalStop(RoadToolkit.DistanceToWaypoint(location, action)-TahoeParams.FL);
// get desired velocity
double desiredSpeed = RoadToolkit.InferFinalSpeed(0, stopSpeed, distance, maxSpeed, aMax, dt);
// generate path following behavior
//return new PathFollowingBehavior(path, new ScalarSpeedCommand(desiredSpeed));
return null;
}
}
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:45,代码来源:RoadToolkit.cs
示例13: GenerateInstallScriptRequestProcessor
public GenerateInstallScriptRequestProcessor(
IPath path,
IHelpContentManager helpContentManager)
{
_path = path;
_helpContentManager = helpContentManager;
}
开发者ID:vebin,项目名称:DocMAH,代码行数:7,代码来源:GenerateInstallScriptRequestProcessor.cs
示例14: IPathToPoints
public static List<Vector2> IPathToPoints(IPath p)
{
List<Vector2> pts = new List<Vector2>();
foreach (IPathSegment lp in p)
pts.Add(lp.Start);
pts.Add(p.EndPoint.pt);
return pts;
}
开发者ID:iamchucky,项目名称:3DpointCloud,代码行数:8,代码来源:PathUtils.cs
示例15: Matches
public bool Matches(IRoute route, IPath path)
{
var routePath = route.Path;
if (!routePath.IsLiteral)
return false;
return routePath.LiteralPath.Equals(path.LiteralPath);
}
开发者ID:ReactiveMarkets,项目名称:Styx,代码行数:8,代码来源:LiteralRankedRoutePredicate.cs
示例16: X509CertificateWrap
/// <summary>
/// Initializes a new instance of the <see cref="X509CertificateWrap"/> class.
/// </summary>
public X509CertificateWrap(IFile file,
IPath path)
{
this.FileWrap = file;
this.PathWrap = path;
this.Initialize();
}
开发者ID:YannBrulhart,项目名称:SystemWrapper-1,代码行数:11,代码来源:X509CertificateWrap.cs
示例17: BecauseOf
public void BecauseOf()
{
m_Path = Get<IPath>();
m_Motion = Get<IMotion>();
m_Path.GetCurrentMotion(Arg.Any<ulong>()).Returns(m_Motion);
m_SelectableObject = new SelectableObject(m_TestObjectName, m_Path);
}
开发者ID:anthony-martin,项目名称:Triangles-in-space,代码行数:9,代码来源:SelectableObjectTests.cs
示例18: Test_ContainsPath
public void Test_ContainsPath() {
var array = new IPath[] {
@"C:\File.txt".ToAbsoluteFilePath(),
@".\".ToRelativeDirectoryPath()
};
Assert.IsTrue(array.ContainsPath(@".\".ToRelativeDirectoryPath()));
Assert.IsFalse(array.ContainsPath(@"..\".ToRelativeDirectoryPath()));
}
开发者ID:ArsenShnurkov,项目名称:NDepend.Path,代码行数:9,代码来源:Test_ExtensionMethodsOnPathsCollection.cs
示例19: UpdatePath
public void UpdatePath(IPath path)
{
if (path == null) return;
if (PathUtils.CheckPathsEqual(this.path, path)) return;
lock (pathLock)
{
this.path = path;
}
}
开发者ID:iamchucky,项目名称:3DpointCloud,代码行数:9,代码来源:VFHPathFollower.cs
示例20: EqualsNullSupported
/// <summary>
/// Returns <i>true</i> if <paramref name="path" /> and <paramref name="otherPath" /> are both <i>null</i>, or if <paramref name="path" />.Equals(
/// <paramref name="otherPath" />).
/// </summary>
/// <param name="path">The first path.</param>
/// <param name="otherPath">The scond path.</param>
public static bool EqualsNullSupported(this IPath path, IPath otherPath)
{
if (path == null)
{
return otherPath == null;
}
return otherPath != null && path.Equals(otherPath);
}
开发者ID:ME3Explorer,项目名称:ME3Explorer,代码行数:15,代码来源:PathHelpers.cs
注:本文中的IPath类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论