public WalkFetchConnection(IWalkTransport t, WalkRemoteObjectDatabase w) { var wt = (Transport)t; _local = wt.Local; _objCheck = wt.CheckFetchedObjects ? new ObjectChecker() : null; _remotes = new List <WalkRemoteObjectDatabase> { w }; _unfetchedPacks = new LinkedList <RemotePack>(); _packsConsidered = new List <string>(); _noPacksYet = new LinkedList <WalkRemoteObjectDatabase>(); _noPacksYet.AddLast(w); _noAlternatesYet = new LinkedList <WalkRemoteObjectDatabase>(); _noAlternatesYet.AddLast(w); _fetchErrors = new Dictionary <ObjectId, List <Exception> >(); _packLocks = new List <PackLock>(4); _revWalk = new RevWalk.RevWalk(_local); _revWalk.setRetainBody(false); _treeWalk = new TreeWalk.TreeWalk(_local); COMPLETE = _revWalk.newFlag("COMPLETE"); IN_WORK_QUEUE = _revWalk.newFlag("IN_WORK_QUEUE"); LOCALLY_SEEN = _revWalk.newFlag("LOCALLY_SEEN"); _localCommitQueue = new DateRevQueue(); _workQueue = new LinkedList <ObjectId>(); }
public RemotePack(string lockMessage, List <PackLock> packLocks, ObjectChecker oC, Repository r, WalkRemoteObjectDatabase c, string pn) { _lockMessage = lockMessage; _packLocks = packLocks; _objCheck = oC; _local = r; DirectoryInfo objdir = _local.ObjectsDirectory; _connection = c; PackName = pn; _idxName = IndexPack.GetIndexFileName(PackName.Slice(0, PackName.Length - 5)); string tn = _idxName; if (tn.StartsWith("pack-")) { tn = tn.Substring(5); } if (tn.EndsWith(IndexPack.IndexSuffix)) { tn = tn.Slice(0, tn.Length - 4); } TmpIdx = new FileInfo(Path.Combine(objdir.ToString(), "walk-" + tn + ".walkidx")); }
public static T FindGridElement <T>(DependencyObject obj, bool failIfNothingFound = true) where T : DependencyObject { ObjectChecker <T> checker = new ObjectChecker <T>(); DObjectChecker.CheckSubTree(obj, checker, failIfNothingFound); return((T)checker.Element); }
public static Expression <Func <TEntity, bool> > Parse <TEntity>(IDataFilter dataFilter, DataFilterMetaInfo filterInfo, Expression node) { ObjectChecker.CheckNotNull(filterInfo); var filterFields = filterInfo.FilterFields; if (filterFields.Count == 0) { return((Expression <Func <TEntity, bool> >)node); } // filter var body = node; foreach (var filterField in filterFields) { var handler = FilterFieldHandlerFactory.GetHandler(filterField.FilterFieldType); if (handler != null) { // call FilterFieldHandler body = handler.Handle(body, filterField); } } // 删除 {True} var optimizer = new ExprTreeOptimizer(body); body = optimizer.Optimize(); return(body as Expression <Func <TEntity, bool> >); }
internal WalkFetchConnection(WalkTransport t, WalkRemoteObjectDatabase w) { NGit.Transport.Transport wt = (NGit.Transport.Transport)t; local = wt.local; objCheck = wt.IsCheckFetchedObjects() ? new ObjectChecker() : null; inserter = local.NewObjectInserter(); reader = local.NewObjectReader(); remotes = new AList <WalkRemoteObjectDatabase>(); remotes.AddItem(w); unfetchedPacks = new List <WalkFetchConnection.RemotePack>(); packsConsidered = new HashSet <string>(); noPacksYet = new List <WalkRemoteObjectDatabase>(); noPacksYet.AddItem(w); noAlternatesYet = new List <WalkRemoteObjectDatabase>(); noAlternatesYet.AddItem(w); fetchErrors = new Dictionary <ObjectId, IList <Exception> >(); packLocks = new AList <PackLock>(4); revWalk = new RevWalk(reader); revWalk.SetRetainBody(false); treeWalk = new TreeWalk(reader); COMPLETE = revWalk.NewFlag("COMPLETE"); IN_WORK_QUEUE = revWalk.NewFlag("IN_WORK_QUEUE"); LOCALLY_SEEN = revWalk.NewFlag("LOCALLY_SEEN"); localCommitQueue = new DateRevQueue(); workQueue = new List <ObjectId>(); }
// Use this for initialization void Start() { _body = GetComponent <Rigidbody2D>(); _player = GetComponent <Player>(); ObjectChecker.CheckNullity(_body, "RigidBody2D not found for Player"); ObjectChecker.CheckNullity(_player, "Player not found"); }
// Use this for initialization void Start() { _economyManager = FindObjectOfType <EconomyManager>(); _text = GetComponent <Text>(); ObjectChecker.CheckNullity(_economyManager, "Economy manager not found"); ObjectChecker.CheckNullity(_text, "Component Text not found"); }
// Use this for initialization void Start() { _buildings = new Dictionary <Vector3, Building>(); _economyManager = FindObjectOfType <EconomyManager>(); _mapInfos = FindObjectOfType <MapInfosManager>(); ObjectChecker.CheckNullity(_economyManager, "Economy manager not found"); ObjectChecker.CheckNullity(_mapInfos, "Map infos not found"); }
void Start() { _mapInfosManager = GetComponentInParent <MapInfosManager>(); _terrain = GetComponent <Terrain>(); ObjectChecker.CheckNullity(_mapInfosManager, "MapInfosManager not found"); ObjectChecker.CheckNullity(_terrain, "Terrain component not found"); ResizeTerrain(); ManageCaseTextureAndHeight(); }
public bool sortSymbol = true; //排序顺序 public CheckItem(ObjectChecker checker, string t, int w = 80, CheckType ty = CheckType.String, CustomClickOption option = null, CustomFilter f = null) { title = t; width = w; type = ty; customFilter = f; clickOption = option; order = checker.checkItem.Count; checker.checkItem.Add(this); }
public static T FindGridElement <T>(DependencyObject obj, DependencyProperty property, object value, bool exactType = false, bool onlyVisibleChildren = false, bool failIfNothingFound = true) where T : DependencyObject { ObjectChecker <T> checker = new ObjectChecker <T>(new DPropertyInfo(property, value), exactType, onlyVisibleChildren); DObjectChecker.CheckSubTree(obj, checker, failIfNothingFound); return((T)checker.Element); }
public bool ExsistTrigger(string triggerName) { string type = "TR"; ObjectChecker checker = new ObjectChecker(); int count = (int)checker.ExsistsObject(type, triggerName); if (count.Equals(1)) { return(true); } return(false); }
public bool ExsistStoredProcedure(string SPName) { string type = "P"; ObjectChecker checker = new ObjectChecker(); int count = (int)checker.ExsistsObject(type, SPName); if (count.Equals(1)) { return(true); } return(false); }
public bool ExsistFunction(string functionName) { string type = "FN"; ObjectChecker checker = new ObjectChecker(); int count = (int)checker.ExsistsObject(type, functionName); if (count.Equals(1)) { return(true); } return(false); }
// Use this for initialization void Start() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } _camera = GetComponent <Camera>(); DontDestroyOnLoad(_camera); ObjectChecker.CheckNullity(player, "Camera can't find the Player"); }
// Use this for initialization void Start() { up.SetActive(true); down.SetActive(false); if (elligibleObjects != null) { objects = new ObjectChecker[elligibleObjects.Length]; for (int i = 0; i < objects.Length; i++) { objects[i] = new ObjectChecker { elligibleObject = elligibleObjects[i], collided = false }; } } }
public static CheckItem CreateCheckItemFromConfig(ObjectChecker checker, CheckItemConfig cfg) { //先带着命名空间 System.Type type = System.Type.GetType("ResourceCheckerPlus." + cfg.ItemClassName); //如果为null,再不带命名空间试一下,防止有哥们忘了加命名空间 if (type == null) { type = System.Type.GetType(cfg.ItemClassName); } if (type == null) { return(null); } CheckItem item = System.Activator.CreateInstance(type, checker, cfg.CheckerName) as CheckItem; return(item); }
public WalkFetchConnection(IWalkTransport t, WalkRemoteObjectDatabase w) { _idBuffer = new MutableObjectId(); _objectDigest = Constants.newMessageDigest(); var wt = (Transport)t; _local = wt.Local; _objCheck = wt.CheckFetchedObjects ? new ObjectChecker() : null; _remotes = new List<WalkRemoteObjectDatabase> { w }; _unfetchedPacks = new LinkedList<RemotePack>(); _packsConsidered = new List<string>(); _noPacksYet = new LinkedList<WalkRemoteObjectDatabase>(); _noPacksYet.AddFirst(w); _noAlternatesYet = new LinkedList<WalkRemoteObjectDatabase>(); _noAlternatesYet.AddFirst(w); _fetchErrors = new Dictionary<ObjectId, List<Exception>>(); _packLocks = new List<PackLock>(4); _revWalk = new RevWalk.RevWalk(_local); _treeWalk = new TreeWalk.TreeWalk(_local); COMPLETE = _revWalk.newFlag("COMPLETE"); IN_WORK_QUEUE = _revWalk.newFlag("IN_WORK_QUEUE"); LOCALLY_SEEN = _revWalk.newFlag("LOCALLY_SEEN"); _localCommitQueue = new DateRevQueue(); _workQueue = new LinkedList<ObjectId>(); }
public RemotePack(string lockMessage, List<PackLock> packLocks, ObjectChecker oC, Repository r, WalkRemoteObjectDatabase c, string pn) { _lockMessage = lockMessage; _packLocks = packLocks; _objCheck = oC; _local = r; DirectoryInfo objdir = _local.ObjectsDirectory; _connection = c; PackName = pn; _idxName = IndexPack.GetIndexFileName(PackName.Slice(0, PackName.Length - 5)); string tn = _idxName; if (tn.StartsWith("pack-")) { tn = tn.Substring(5); } if (tn.EndsWith(IndexPack.IndexSuffix)) { tn = tn.Slice(0, tn.Length - 4); } TmpIdx = new FileInfo(Path.Combine(objdir.ToString(), "walk-" + tn + ".walkidx")); }
void Start() { rgb = GetComponent <Rigidbody>(); objectChecker = objChk.GetComponent <ObjectChecker>(); text.gameObject.SetActive(false); }
public void setObjectChecker(ObjectChecker oc) { _objCheck = oc; }
// Use this for initialization void Start() { objectChecker = trashHolder.GetComponent <ObjectChecker>(); }
/// <summary> /// Configure the checker used to validate received objects. /// <para/> /// Usually object checking isn't necessary, as Git implementations only /// create valid objects in pack files. However, additional checking may be /// useful if processing data from an untrusted source. /// </summary> /// <param name="oc">the checker instance; null to disable object checking.</param> public void setObjectChecker(ObjectChecker oc) { _objCheck = oc; }
// Runs before the Start() void Awake() { _dialogSound = GetComponent <AudioSource>(); ObjectChecker.CheckNullity(_dialogSound, "Dialog sound not found"); }
public void setUp() { _checker = new ObjectChecker(); }