// Required for all IDumpers for them to work, but can't enforced by the interface because it's static: public static PathValue CreateFromDump(SafeSharedObjects shared, Dump d) { var newObj = new PathValue(); newObj.Shared = shared; newObj.LoadDump(d); return(newObj); }
public override bool Equals(object other) { PathValue pVal = other as PathValue; if (!ReferenceEquals(pVal, null)) // ReferenceEquals prevents infinite recursion with overloaded == operator. { return(Path == pVal.Path); } GlobalPath gVal = other as GlobalPath; if (!ReferenceEquals(gVal, null)) // ReferenceEquals prevents infinite recursion with overloaded == operator. { return(Path == gVal); } // fallback: return(base.Equals(other)); }
public override void Execute(SafeSharedObjects shared) { int remaining = CountRemainingArgs(shared); GlobalPath path; if (remaining == 0) { path = GlobalPath.FromVolumePath(shared.VolumeMgr.CurrentDirectory.Path, shared.VolumeMgr.GetVolumeRawIdentifier(shared.VolumeMgr.CurrentVolume)); } else { object pathObject = PopValueAssert(shared, true); path = shared.VolumeMgr.GlobalPathFromObject(pathObject); } AssertArgBottomAndConsume(shared); ReturnValue = new PathValue(path, shared); }
public override void Execute(SharedObjects shared) { AssertArgBottomAndConsume(shared); int currentOpcode = shared.Cpu.GetCallTrace()[0]; Opcode opcode = shared.Cpu.GetOpcodeAt(currentOpcode); ReturnValue = new PathValue(opcode.SourcePath, shared); }
public override void Execute(SharedObjects shared) { int remaining = CountRemainingArgs(shared); GlobalPath path; if (remaining == 0) { path = GlobalPath.FromVolumePath(shared.VolumeMgr.CurrentDirectory.Path, shared.VolumeMgr.GetVolumeRawIdentifier(shared.VolumeMgr.CurrentVolume)); } else { object pathObject = PopValueAssert(shared, true); path = shared.VolumeMgr.GlobalPathFromObject(pathObject); } AssertArgBottomAndConsume(shared); ReturnValue = new PathValue(path, shared); }