Example #1
0
        protected void SetupReferenceNameInputBox(TextBox textBox, ReferenceType referenceType)
        {
            Verify.Argument.IsNotNull(textBox, "textBox");

            textBox.KeyPress += OnRevisionInputBoxKeyPress;
            textBox.Tag = referenceType;
        }
 public NZBDownload AddNZB(string filePath, ReferenceType refType = ReferenceType.FilePath)
 {
     Downloads.Add(new NZBDownload()
     {
         NZBDoc = new NZBDocument(filePath, refType),
         Status = NZBDLStatus.NotStarted
     });
     return Downloads.Last();
 }
        internal ClassPrepareEventArgs(VirtualMachine virtualMachine, SuspendPolicy suspendPolicy, EventRequest request, ThreadReference thread, string signature, ReferenceType type)
            : base(virtualMachine, suspendPolicy, request, thread)
        {
            Contract.Requires<ArgumentNullException>(signature != null, "signature");
            Contract.Requires<ArgumentException>(!string.IsNullOrEmpty(signature));

            _signature = signature;
            _type = type;
        }
Example #4
0
        public ExceptionRequest(VirtualMachine virtualMachine, ReferenceType exceptionType, bool notifyWhenCaught, bool notifyWhenUncaught)
            : base(virtualMachine)
        {
            Contract.Requires(virtualMachine != null);

            _exceptionType = exceptionType;
            _notifyWhenCaught = notifyWhenCaught;
            _notifyWhenUncaught = notifyWhenUncaught;
            Modifiers.Add(Types.EventRequestModifier.ExceptionFilter(exceptionType != null ? exceptionType.ReferenceTypeId : default(Types.ReferenceTypeId), notifyWhenCaught, notifyWhenUncaught));
        }
Example #5
0
        public static IReferencePart GetReferencePart(ReferenceType referenceType)
        {
            if (referenceType == ReferenceType.CollectionPart)
            return new ReferencePartCollection();

             if (referenceType == ReferenceType.PropertyPart)
            return new ReferencePartProperty();

             return new ReferencePartType();
        }
		public void MakeReference(AssemblyName asmName, string fullPath)
		{
			_refType = ReferenceType.Reference;
			_item.Name = _refType.ToString();
			this.Assembly = asmName;
			this.HintPath = fullPath;
			_item.RemoveMetadata("Name");
			_item.RemoveMetadata("Project");
			_item.RemoveMetadata("Package");
		}
 public string ToString(ReferenceType referenceType)
 {
     switch (referenceType)
     {
         case ReferenceType.Reference:
             return string.Format("Reference=*\\G{0}#{1}#0#{2}#{3}", Guid, Version, Filename, Description);
         case ReferenceType.Component:
             return string.Format("Object={0}#{1}#0#;{2}", Guid, Version, Filename);
         default:
             throw new ArgumentOutOfRangeException("referenceType");
     }
 }
Example #8
0
 public ReferenceState GetState(string fullName, ReferenceType type)
 {
     ReferenceState state;
     if(_states.TryGetValue(fullName, out state))
     {
         if(state.ReferenceType != type)
         {
             state = null;
         }
     }
     return state;
 }
Example #9
0
 public ReferenceChange(
     ReferenceType referenceType,
     string fullName, string name,
     Hash oldHash, Hash newHash,
     ReferenceChangeType changeType)
 {
     _referenceType = referenceType;
     _fullName = fullName;
     _name = name;
     _oldHash = oldHash;
     _newHash = newHash;
     _changeType = changeType;
 }
		/// <summary>
		/// Recreates appropriate folder for reference mark files.
		/// </summary>
		private static void RecreateEndPath(ReferenceType referenceType, string referencesDirectory)
		{
			string path = GetEndPath(referenceType, referencesDirectory);
			if (Directory.Exists(path))
			{
				Directory.Delete(path, true);
				Thread.Sleep(500);
			}

			Directory.CreateDirectory(path);
			Thread.Sleep(500);

			MarkUpdatedFolder(referencesDirectory);
		}
Example #11
0
        private RefsState(Repository repository, ReferenceType referenceTypes)
        {
            _states = new Dictionary<string, ReferenceState>();

            if((referenceTypes & ReferenceType.LocalBranch) == ReferenceType.LocalBranch)
            {
                CaptureHeads(repository);
            }
            if((referenceTypes & ReferenceType.RemoteBranch) == ReferenceType.RemoteBranch)
            {
                CaptureRemotes(repository);
            }
            if((referenceTypes & ReferenceType.Tag) == ReferenceType.Tag)
            {
                CaptureTags(repository);
            }
        }
Example #12
0
		public ReferenceInfo(Project project, BuildItem item)
		{
            _project = project;
            _item = item;
            _refType = (ReferenceType)Enum.Parse(typeof(ReferenceType), item.Name);

			if (_refType == ReferenceType.ProjectReference)
            {
				_assembly = new AssemblyName();
            }
            else if (RefType == ReferenceType.Reference)
            {
				string name = _item.Include;
				if (name.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || name.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
					name = name.Substring(0, name.Length - 4);
				_assembly = new AssemblyName(name);
            }
            else
                throw new ApplicationException("Unkown reference type " + item.Name);
		}
        public NZBRootBaseClass(string objectRef, ReferenceType refType = ReferenceType.FilePath)
        {
            // init XmlWriter settings
            settings.Indent = false;
            settings.Encoding = Encoding.GetEncoding("iso-8859-1");
            settings.NamespaceHandling = NamespaceHandling.OmitDuplicates;

            if (string.IsNullOrEmpty(objectRef))
                return;
            switch (refType)
            {
                case ReferenceType.SerializedData: 
                    Deserialize(objectRef);
                    break;
                case ReferenceType.FilePath:
                    using (var sr = new StreamReader(objectRef, true))
                    {
                        Deserialize(sr.ReadToEnd());
                    }
                    break;
            }
        }
        void OnGUI()
        {
            EditorGUILayout.BeginHorizontal ();

            refType = (ReferenceType)EditorGUILayout.EnumPopup (refType, EditorStyles.toolbarPopup);

            EditorGUILayout.EndHorizontal ();

            GUIStyle styles = new GUIStyle ();
            styles.margin.left = 10;
            styles.margin.top = 5;

            current = EditorGUILayout.BeginScrollView (current);

            try {
                switch (refType) {
                case ReferenceType.AllReferencingBy:
                    OnGUIAllObjectReferenceFrom ();
                    break;
                case ReferenceType.AllReferencing:
                    OnGUIAllObjectReferenceTo ();
                    break;
                case ReferenceType.AllComponents:
                    OnGUIAllComponent ();
                    break;
                case ReferenceType.TagAndLayers:
                    tagAndLayers.OnGUI ();
                    break;
                }

            } catch (UnityEngine.ExitGUIException e) {
                Debug.LogWarning (e.ToString ());
            } catch (System.Exception e) {
                Debug.LogWarning (e.ToString ());
            }

            EditorGUILayout.EndScrollView ();
        }
 protected UndefinedReferenceException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if (info == null)
     {
         throw new ArgumentNullException("info");
     }
     m_name = info.GetString("name");
     m_type = (ReferenceType)Enum.Parse(typeof(ReferenceType), info.GetString("type"));
 }
Example #16
0
		protected void InitCustomReference (string reference)
		{
			Reference = reference;
			referenceType = ReferenceType.Custom;
		}
Example #17
0
		public ProjectReference (Project referencedProject)
		{
			referenceType = ReferenceType.Project;
			reference = referencedProject.Name;
			specificVersion = true;
		}
Example #18
0
		public ProjectReference (ReferenceType referenceType, string reference): this (referenceType, reference, null)
		{
		}
Example #19
0
 protected void InitCustomReference(string reference)
 {
     Reference     = reference;
     referenceType = ReferenceType.Custom;
 }
Example #20
0
 public AddressProxy(ReferenceType referenceType)
 {
 }
 private static string GetMarkup(string current, string referenced, ReferenceType refType,
                                 string currentLanguage    = LanguageNames.CSharp,
                                 string referencedLanguage = LanguageNames.CSharp)
 => refType switch
 {
Example #22
0
 private static string ConvertIdRef(ReferenceType reference)
 {
     return((reference != null) ? reference.IdRef : string.Empty);
 }
 /// <summary>
 /// Sets the attribute reference type to be used </summary>
 /// <param name="type"> </param>
 public void setReferenceType(ReferenceType type)
 {
     this.referenceType = type;
 }
Example #24
0
 private void SortEntityAndNetworkRefs_v1_5()
 {
     this._vappTemplateRefs     = new List <ReferenceType>();
     this._mediaRefs            = new List <ReferenceType>();
     this._vappRefsByName       = new Dictionary <string, ReferenceType>();
     this._orgNetworkRefsByName = new Dictionary <string, ReferenceType>();
     this._storageProfileRefs   = new List <ReferenceType>();
     this._diskRefs             = new List <ReferenceType>();
     if (this.Resource.ResourceEntities != null)
     {
         ResourceEntitiesType         resourceEntities          = this.Resource.ResourceEntities;
         List <ResourceReferenceType> resourceReferenceTypeList = new List <ResourceReferenceType>();
         if (resourceEntities.ResourceEntity != null)
         {
             resourceReferenceTypeList = ((IEnumerable <ResourceReferenceType>)resourceEntities.ResourceEntity).ToList <ResourceReferenceType>();
         }
         if (resourceReferenceTypeList != null)
         {
             foreach (ResourceReferenceType resourceReferenceType in resourceReferenceTypeList)
             {
                 if (resourceReferenceType.type.Equals("application/vnd.vmware.vcloud.vAppTemplate+xml"))
                 {
                     this._vappTemplateRefs.Add((ReferenceType)resourceReferenceType);
                 }
                 else if (resourceReferenceType.type.Equals("application/vnd.vmware.vcloud.media+xml"))
                 {
                     this._mediaRefs.Add((ReferenceType)resourceReferenceType);
                 }
                 else if (resourceReferenceType.type.Equals("application/vnd.vmware.vcloud.vApp+xml"))
                 {
                     this._vappRefsByName.Add(resourceReferenceType.name, (ReferenceType)resourceReferenceType);
                 }
                 else if (resourceReferenceType.type.Equals("application/vnd.vmware.vcloud.disk+xml"))
                 {
                     this._diskRefs.Add((ReferenceType)resourceReferenceType);
                 }
                 else
                 {
                     Logger.Log(TraceLevel.Warning, SdkUtil.GetI18nString(SdkMessage.UNKNOWN_REF_TYPE_MSG), resourceReferenceType.type);
                 }
             }
         }
     }
     if (this.Resource.AvailableNetworks != null)
     {
         AvailableNetworksType availableNetworks = this.Resource.AvailableNetworks;
         if (availableNetworks != null && availableNetworks.Network != null)
         {
             foreach (ReferenceType referenceType in availableNetworks.Network)
             {
                 if (!this._orgNetworkRefsByName.ContainsKey(referenceType.name))
                 {
                     this._orgNetworkRefsByName.Add(referenceType.name, referenceType);
                 }
             }
         }
     }
     if (this.Resource.Link != null)
     {
         foreach (LinkType linkType in this.Resource.Link)
         {
             if (linkType.rel.Equals("up") && linkType.type.Equals("application/vnd.vmware.admin.organization+xml"))
             {
                 this._adminOrgReference = (ReferenceType)linkType;
             }
             if (linkType.rel.Equals("alternate") && linkType.type.Equals("application/vnd.vmware.vcloud.vdc+xml"))
             {
                 this._vdcReference = (ReferenceType)linkType;
             }
             if (linkType.rel.Equals("down") && linkType.type.Equals("application/vnd.vmware.admin.OrganizationVdcResourcePoolSet+xml"))
             {
                 this._orgVdcResourcePoolsRef = (ReferenceType)linkType;
             }
         }
     }
     if (this.Resource.VCloudExtension != null)
     {
         foreach (VCloudExtensionType vcloudExtensionType in this.Resource.VCloudExtension)
         {
             foreach (XmlNode xmlNode in vcloudExtensionType.Any)
             {
                 VimObjectRefType resource = Response.GetResource <VimObjectRefType>(xmlNode.OuterXml);
                 if (resource.VimObjectType.Equals(VimObjectTypeEnum.RESOURCE_POOL.Value()))
                 {
                     this._primaryResourcePoolVimRef = resource;
                 }
             }
         }
     }
     if (this.Resource.VdcStorageProfiles == null || this.Resource.VdcStorageProfiles.VdcStorageProfile == null)
     {
         return;
     }
     foreach (ReferenceType referenceType in this.Resource.VdcStorageProfiles.VdcStorageProfile)
     {
         this._storageProfileRefs.Add(referenceType);
     }
 }
 private static Bitmap GetIcon(ReferenceType referenceType)
 {
     switch(referenceType)
     {
         case ReferenceType.RemoteBranch:
             return CachedResources.Bitmaps["ImgBranchRemote"];
         case ReferenceType.LocalBranch:
             return CachedResources.Bitmaps["ImgBranch"];
         case ReferenceType.Tag:
             return CachedResources.Bitmaps["ImgTag"];
         default:
             return null;
     }
 }
		TreeIter FindReference (ReferenceType referenceType, string reference)
		{
			TreeIter looping_iter;
			if (refTreeStore.GetIterFirst (out looping_iter)) {
				do {
					ProjectReference pref = (ProjectReference) refTreeStore.GetValue (looping_iter, ProjectReferenceColumn);
					if (pref.Reference == reference && pref.ReferenceType == referenceType) {
						return looping_iter;
					}
				} while (refTreeStore.IterNext (ref looping_iter));
			}
			return TreeIter.Zero;
		}
Example #27
0
		void ReadReferences (MakefileVar refVar, ReferenceType refType, string id, DotNetProject project)
		{
			if (String.IsNullOrEmpty (refVar.Name) || project == null)
				return;

			//All filenames are treated as relative to the Makefile path
			List<string> references = Makefile.GetListVariable (refVar.Name);
			if (references == null) {
				string msg = GettextCatalog.GetString (
					"Makefile variable '{0}' not found. Skipping syncing of all '{1}' references for project {2}.",
					refVar.Name, id, project.Name);
				LoggingService.LogWarning (msg);
				monitor.ReportWarning (msg);
				SaveReferences = false;
				return;
			}
			//FIXME: Trim?
			bool usePrefix = !String.IsNullOrEmpty (refVar.Prefix);
			int len = 0;
			if (refVar.Prefix != null)
				len = refVar.Prefix.Length;

			ReferencedPackages.Clear ();
			foreach (string r in references) {
				//Handle -r:System,System.Data also
				try { 
					ParseReference (r, usePrefix, refVar, len, refType, project);
				} catch (Exception e) {
					string msg = GettextCatalog.GetString ("Unable to parse reference '{0}' for project '{1}'. Ignoring.", r, project.Name);
					LoggingService.LogWarning (msg, e);
					monitor.ReportWarning (msg);
					refVar.Extra.Add (r);
				}
			}

			referencedPackages = null;
		}
Example #28
0
 public static ProjectReference CreateCustomReference(ReferenceType referenceType, string reference, string hintPath = null)
 {
     return(new ProjectReference(referenceType, reference, hintPath));
 }
		void SetSelection (ReferenceType type, string name, string pkg, bool selected)
		{
			if (selected)
				selection.Add (type + " " + name + " " + pkg);
			else
				selection.Remove (type + " " + name + " " + pkg);
		}
Example #30
0
        public static void SetupAutoCompleteSource(TextBox textBox, Repository repository, ReferenceType referenceTypes)
        {
            Verify.Argument.IsNotNull(textBox, nameof(textBox));
            Verify.Argument.IsNotNull(repository, nameof(repository));

            if (GlobalBehavior.AutoCompleteMode == AutoCompleteMode.None)
            {
                return;
            }

            var source = textBox.AutoCompleteCustomSource;

            if ((referenceTypes & ReferenceType.LocalBranch) == ReferenceType.LocalBranch)
            {
                foreach (var branch in repository.Refs.Heads)
                {
                    source.Add(branch.Name);
                }
            }
            if ((referenceTypes & ReferenceType.RemoteBranch) == ReferenceType.RemoteBranch)
            {
                foreach (var branch in repository.Refs.Remotes)
                {
                    source.Add(branch.Name);
                }
            }
            if ((referenceTypes & ReferenceType.Tag) == ReferenceType.Tag)
            {
                foreach (var tag in repository.Refs.Tags)
                {
                    source.Add(tag.Name);
                }
            }

            textBox.AutoCompleteMode   = GlobalBehavior.AutoCompleteMode;
            textBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
        }
        public void AddReferenceType(ReferenceType referenceType)
        {
            Check.NotNull(referenceType, nameof(referenceType));

            ReferenceTypeColl.InsertOne(referenceType);
        }
Example #32
0
 internal DataPathAssetReference(ReferenceType referenceType, string datastoreId, string path) : base(referenceType)
 {
     DatastoreId   = datastoreId;
     Path          = path;
     ReferenceType = referenceType;
 }
 public CustomFieldProxy(ReferenceType referenceType)
 {
 }
Example #34
0
 internal OutputPathAssetReference(ReferenceType referenceType, string jobId, string path) : base(referenceType)
 {
     JobId         = jobId;
     Path          = path;
     ReferenceType = referenceType;
 }
Example #35
0
 protected Reference(ReferenceType referenceType, bool enabled)
 {
     this.referenceType = referenceType;
     this.enabled       = enabled;
 }
Example #36
0
        public JsonResult MakePaymentData(PaymentModel objPaymentModel, PaymentModel ObjData)
        {
            eTracLoginModel ObjLoginModel = null;
            long            Vendor        = 0;
            var             result        = "";
            var             resultPayment = new BillPayment();

            if (Session["eTrac"] != null)
            {
                ObjLoginModel = (eTracLoginModel)(Session["eTrac"]);
            }
            try
            {
                if (objPaymentModel != null && ObjData != null)
                {
                    objPaymentModel.UserId = ObjLoginModel.UserId;

                    string realmId = CallbackController.RealMId.ToString(); // Session["realmId"].ToString();
                    try
                    {
                        if (realmId != null)
                        {
                            string AccessToken = CallbackController.AccessToken.ToString(); //Session["access_token"].ToString();
                            var    principal   = User as ClaimsPrincipal;
                            OAuth2RequestValidator oauthValidator = new OAuth2RequestValidator(AccessToken);

                            // Create a ServiceContext with Auth tokens and realmId
                            ServiceContext serviceContext = new ServiceContext(realmId, IntuitServicesType.QBO, oauthValidator);
                            serviceContext.IppConfiguration.MinorVersion.Qbo = "23";
                            DataService commonServiceQBO = new DataService(serviceContext);
                            // Create a QuickBooks QueryService using ServiceContext
                            QueryService <Vendor> querySvc   = new QueryService <Vendor>(serviceContext);
                            List <Vendor>         vendorList = querySvc.ExecuteIdsQuery("SELECT * FROM Vendor MaxResults 1000").ToList();

                            QueryService <Account> querySvcAccount = new QueryService <Account>(serviceContext);
                            List <Account>         accountData     = querySvcAccount.ExecuteIdsQuery("SELECT * FROM Account MaxResults 1000").ToList();

                            var VendorDetails = _IVendorManagement.GetCompanyQuickBookId(Convert.ToInt64(ObjData.VendorId));
                            //var getAccountDetails = _IVendorManagement.GetAccountDetailsByVendorId(Convert.ToInt64(objPaymentModel.OpeartorCAD_Id)); // (Convert.ToInt64(ObjData.VendorId));
                            var getAccountDetails            = _IVendorManagement.GetAccountDetailsByVendorId(Convert.ToInt64(objPaymentModel.CompanyAccountId)); // (Convert.ToInt64(ObjData.VendorId));
                            var getBill                      = _IBillDataManager.GetBillQBKId(Convert.ToInt64(ObjData.BillNo));
                            QueryService <Bill> querySvcBill = new QueryService <Bill>(serviceContext);
                            List <Bill>         billData     = querySvcBill.ExecuteIdsQuery("SELECT * FROM Bill MaxResults 1000").ToList();

                            var bill = billData.Where(x => x.Id == getBill.ToString()).FirstOrDefault();
                            // var vendorData = vendorList.Where(x => x.Id == "64").FirstOrDefault();
                            var payment = new BillPayment();
                            //Vendor Reference
                            var reference         = new ReferenceType();
                            var accountRef        = new AccountBasedExpenseLineDetail();
                            var billPaymentCheck  = new BillPaymentCheck();
                            var billPaymentCredit = new BillPaymentCreditCard();
                            var line     = new Line();
                            var lineList = new List <Line>();

                            if (VendorDetails > 0)
                            {
                                var vendorData = vendorList.Where(x => x.Id == VendorDetails.ToString()).FirstOrDefault();
                                //Vendor Reference
                                payment.VendorRef = new ReferenceType()
                                {
                                    name  = vendorData.DisplayName,
                                    Value = vendorData.Id
                                };
                            }
                            line.LineNum = "1";
                            var any = new IntuitAnyType();
                            if (getAccountDetails != null)
                            {
                                var ayintuit        = new IntuitAnyType();
                                var accountsDetails = accountData.Where(x => x.Id == getAccountDetails.QuickbookAcountId.ToString()).FirstOrDefault();//getAccountDetails.QuickbookAcountId.ToString()
                                if (ObjData.PaymentMode == "Wired")
                                {
                                    payment.PayType = BillPaymentTypeEnum.CreditCard;
                                    var CCD = new CreditCardPayment();
                                    billPaymentCredit.CCAccountRef = new ReferenceType()
                                    {
                                        name  = accountsDetails.Name,
                                        Value = accountsDetails.Id,
                                    };
                                    payment.AnyIntuitObject = billPaymentCredit;
                                }
                                else if (ObjData.PaymentMode == "Card")
                                {
                                    payment.PayType = BillPaymentTypeEnum.CreditCard;
                                    var CCD = new CreditCardPayment();
                                    billPaymentCredit.CCAccountRef = new ReferenceType()
                                    {
                                        name  = accountsDetails.Name,
                                        Value = accountsDetails.Id,
                                    };
                                    payment.AnyIntuitObject = billPaymentCredit;
                                }
                                else if (ObjData.PaymentMode == "Check")
                                {
                                    var checking = new CheckPayment();
                                    payment.PayType = BillPaymentTypeEnum.Check;
                                    billPaymentCheck.BankAccountRef = new ReferenceType()
                                    {
                                        name  = accountsDetails.Name,
                                        Value = accountsDetails.Id
                                    };
                                    billPaymentCheck.PrintStatus = PrintStatusEnum.NeedToPrint;
                                    payment.AnyIntuitObject      = billPaymentCheck;
                                }
                            }
                            payment.APAccountRef = new ReferenceType()
                            {
                                name  = "Accounts Payable (A/P)",
                                Value = "33"
                            };
                            QueryService <Department> querySvcDept = new QueryService <Department>(serviceContext);
                            var LocationName = _IBillDataManager.GetLocationDataByLocId(Convert.ToInt64(ObjData.LocationId));
                            payment.DepartmentRef = new ReferenceType()
                            {
                                name  = LocationName.LocationName,
                                Value = LocationName.QBK_Id.ToString()
                            };

                            line.Amount          = Convert.ToDecimal(ObjData.BillAmount);
                            line.AmountSpecified = true;
                            var linkedlist = new List <LinkedTxn>();
                            var linked     = new LinkedTxn();
                            linked.TxnId   = bill.Id;
                            linked.TxnType = "Bill";

                            linkedlist.Add(linked);
                            line.LinkedTxn  = linkedlist.ToArray();
                            line.DetailType = LineDetailTypeEnum.PaymentLineDetail;
                            lineList.Add(line);
                            payment.Line = lineList.ToArray();
                            //payment.PayType = BillPaymentTypeEnum.CreditCard;
                            payment.PayTypeSpecified  = true;
                            payment.TotalAmt          = Convert.ToDecimal(ObjData.BillAmount);
                            payment.TotalAmtSpecified = true;

                            var metaData = new ModificationMetaData();
                            metaData.CreateTime      = Convert.ToDateTime(ObjData.BillDate);
                            payment.MetaData         = metaData;
                            payment.PayTypeSpecified = true;
                            resultPayment            = commonServiceQBO.Add(payment) as BillPayment;

                            //To close PO after Payment. Update Payment in Quickbook.
                            QueryService <PurchaseOrder> querySvcPO = new QueryService <PurchaseOrder>(serviceContext);
                            List <PurchaseOrder>         POList     = querySvcPO.ExecuteIdsQuery("SELECT * FROM PurchaseOrder MaxResults 1000").ToList();
                            if (ObjData.BillType == "PO")
                            {
                                var getPOQData = _IPaymentManager.GetPODetails(objPaymentModel, ObjData);
                                if (getPOQData.QuickBookPOId > 0)
                                {
                                    var data = POList.Where(x => x.Id == getPOQData.QuickBookPOId.ToString()).FirstOrDefault();
                                    data.POStatus = PurchaseOrderStatusEnum.Closed;
                                    var update = commonServiceQBO.Update(data) as PurchaseOrder;
                                }
                            }
                        }
                        else
                        {
                            ViewBag.Message           = CommonMessage.FailureMessage();
                            result                    = CommonMessage.FailureMessage();
                            ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger;
                            return(Json(result, JsonRequestBehavior.AllowGet));
                        }
                    }
                    catch (Exception ex)
                    {
                        ViewBag.Message           = ex.Message;
                        ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger;
                    }

                    result = _IPaymentManager.MakePayment(objPaymentModel, ObjData);
                    if (result != null)
                    {
                        return(Json(result, JsonRequestBehavior.AllowGet));
                    }
                    else
                    {
                        ViewBag.Message           = CommonMessage.FailureMessage();
                        ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger;
                        return(Json(result, JsonRequestBehavior.AllowGet));
                    }
                }
                else
                {
                    ViewBag.Message           = CommonMessage.FailureMessage();
                    ViewBag.AlertMessageClass = ObjAlertMessageClass.Danger;
                }
            }
            catch (Exception ex)
            {
                return(Json(ex.Message, JsonRequestBehavior.AllowGet));
            }
            //return null;
            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Example #37
0
 bool IsSelected(ReferenceType type, string name, string pkg)
 {
     return(selection.Contains(type + " " + name + " " + pkg));
 }
Example #38
0
        public IColumnBuilder <TModel> Reference(Expression <Func <TModel, object> > member, ReferenceType referenceType = ReferenceType.Foreign)
        {
            Reference(referenceType);
            _columnDefinition.ReferenceMember = MemberHelper <TModel> .GetMembers(member).Last();

            return(this);
        }
Example #39
0
 /// <summary>
 /// Converts the item into a shared node.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="eventArgs">The <see cref="EventArgs"/> instance containing the event data.</param>
 /// <param name="t">The tree node to be converted.</param>
 /// <param name="type">The type of conversion.</param>
 private void ConvertItem_Click(object sender, EventArgs eventArgs, TreeNode t, ReferenceType type)
 {
     this.cmodel.ConvertLevelByUID(t.Name, Utils.GetDimension(t), Utils.GetBusinessProcessName(t), type);
     this.Draw();
 }
 public static IQueryable <FascicleDocumentUnit> GetByReferenceTypeAndDocumentUnit(this IRepository <FascicleDocumentUnit> repository, Guid uniqueIdDocumentUnit, ReferenceType referenceType)
 {
     return(repository.Query(x => x.DocumentUnit.UniqueId == uniqueIdDocumentUnit && x.ReferenceType == referenceType)
            .SelectAsQueryable());
 }
Example #41
0
 public ProjectReference(Project referencedProject)
 {
     referenceType   = ReferenceType.Project;
     reference       = referencedProject.Name;
     specificVersion = true;
 }
 public static int CountByReferenceTypeAndDocumentUnit(this IRepository <FascicleDocumentUnit> repository, Guid uniqueIdDocumentUnit, ReferenceType referenceType)
 {
     return(repository.Queryable(true)
            .Where(x => x.DocumentUnit.UniqueId == uniqueIdDocumentUnit && x.ReferenceType == referenceType)
            .Count());
 }
Example #43
0
 public void AddReferenceType(ReferenceType referenceType)
 {
 }
Example #44
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            var obj = JObject.Load(reader);

            // Get dependency name
            var name = obj["Name"].Value <string>();

            // Try get dependency version
            var     versionString = obj["Version"].Value <string>();
            Version version;

            if (!Version.TryParse(versionString, out version))
            {
                logger.LogWarning(
                    string.Format("The version of Package Dependency {0} could not be deserialized.", name),
                    Logging.WarningLevel.Moderate);
            }

            //default to package.
            ReferenceType parsedType = ReferenceType.Package;
            JToken        referenceTypeToken;

            if (obj.TryGetValue(ReferenceTypePropString, out referenceTypeToken))
            {
                var referenceTypeString = referenceTypeToken.Value <string>();
                if (!Enum.TryParse <ReferenceType>(referenceTypeString, out parsedType))
                {
                    logger.LogWarning(
                        string.Format("The ReferenceType of Dependency {0} could not be deserialized.", name),
                        Logging.WarningLevel.Moderate);
                }
            }

            INodeLibraryDependencyInfo depInfo;

            //select correct constructor based on referenceType
            switch (parsedType)
            {
            case ReferenceType.Package:
                depInfo = new PackageDependencyInfo(name, version);
                break;

            /*TODO add other cases: for example
             * case ReferenceType.ZeroTouch
             * depInfp = new ZeroTouchDependencyInfo(name,version)
             */
            default:
                depInfo = new PackageDependencyInfo(name, version);
                break;
            }



            // Try get dependent node IDs
            var nodes = obj["Nodes"].Values <string>();

            foreach (var nodeID in nodes)
            {
                Guid guid;
                if (!Guid.TryParse(nodeID, out guid))
                {
                    logger.LogWarning(
                        string.Format("The id ({0}) of a node dependent on {1} could not be parsed as a GUID.", nodeID, name),
                        Logging.WarningLevel.Moderate);
                }
                else
                {
                    depInfo.AddDependent(guid);
                }
            }
            return(depInfo);
        }
Example #45
0
		public ProjectReference (ReferenceType referenceType, string reference, string hintPath)
		{
			if (referenceType == ReferenceType.Assembly) {
				specificVersion = false;
				if (hintPath == null) {
					hintPath = reference;
					reference = Path.GetFileNameWithoutExtension (reference);
				}
			}

			this.referenceType = referenceType;
			this.reference = reference;
			this.hintPath = hintPath;
			UpdatePackageReference ();
		}
Example #46
0
 public AssetAssignmentsViewItemProxy(ReferenceType referenceType)
 {
 }
Example #47
0
		public ProjectReference (SystemAssembly asm)
		{
			referenceType = ReferenceType.Package;
			reference = asm.FullName;
			if (asm.Package.IsFrameworkPackage)
				specificVersion = false;
			if (!asm.Package.IsGacPackage)
				package = asm.Package.Name;
			UpdatePackageReference ();
		}
Example #48
0
 public ObjectReference(ReferenceType type)
 {
     Type = type;
 }
 internal UndefinedReferenceException(Lookup lookup, Context context)
 {
     m_lookup = lookup;
     m_name = lookup.Name;
     m_type = lookup.RefType;
     m_context = context;
 }
Example #50
0
 public Messenger(bool isThreadSafe, ReferenceType refrenceType = ReferenceType.WeakReference)
 {
     IsThreadSafe  = isThreadSafe;
     ReferenceType = refrenceType;
 }
		public void RemoveReference (ReferenceType referenceType, string reference)
		{
			TreeIter iter = FindReference (referenceType, reference);
			if (iter.Equals (TreeIter.Zero))
				return;
			refTreeStore.Remove (ref iter);
		}
Example #52
0
        public ReferenceTreeBinding(CustomListBoxItemsCollection itemHost, Repository repository,
                                    bool groupItems, bool groupRemoteBranches, Predicate <IRevisionPointer> predicate, ReferenceType referenceTypes)
        {
            Verify.Argument.IsNotNull(itemHost, nameof(itemHost));
            Verify.Argument.IsNotNull(repository, nameof(repository));

            _itemHost  = itemHost;
            Repository = repository;

            _groupItems     = groupItems;
            _groupRemotes   = groupRemoteBranches;
            _predicate      = predicate;
            _referenceTypes = referenceTypes;

            _itemHost.Clear();
            if (groupItems)
            {
                Heads = new ReferenceGroupListItem(repository, ReferenceType.LocalBranch);
                Heads.Items.Comparison = BranchListItem.CompareByName;
                Remotes = new ReferenceGroupListItem(repository, ReferenceType.RemoteBranch);
                if (groupRemoteBranches)
                {
                    Remotes.Items.Comparison = RemoteListItem.CompareByName;
                }
                else
                {
                    Remotes.Items.Comparison = RemoteBranchListItem.CompareByName;
                }
                Tags = new ReferenceGroupListItem(repository, ReferenceType.Tag);
                Tags.Items.Comparison = TagListItem.CompareByName;
                _itemHost.Comparison  = null;
            }
            else
            {
                Heads   = null;
                Remotes = null;
                Tags    = null;
                _itemHost.Comparison = ReferenceListItemBase.UniversalComparer;
            }

            _remotes = groupRemoteBranches ? new List <RemoteListItem>(repository.Remotes.Count) : null;

            if ((referenceTypes & ReferenceType.LocalBranch) == ReferenceType.LocalBranch)
            {
                var refs = Repository.Refs.Heads;
                lock (refs.SyncRoot)
                {
                    foreach (var branch in refs)
                    {
                        if (predicate != null && !predicate(branch))
                        {
                            continue;
                        }
                        var item = new BranchListItem(branch);
                        item.Activated += OnItemActivated;
                        CustomListBoxItemsCollection host;
                        if (groupItems)
                        {
                            host = Heads.Items;
                        }
                        else
                        {
                            host = _itemHost;
                        }
                        host.Add(item);
                    }
                    refs.ObjectAdded += OnBranchCreated;
                }
            }

            if ((referenceTypes & ReferenceType.RemoteBranch) == ReferenceType.RemoteBranch)
            {
                var refs = repository.Refs.Remotes;
                lock (refs.SyncRoot)
                {
                    foreach (var branch in refs)
                    {
                        if (predicate != null && !predicate(branch))
                        {
                            continue;
                        }
                        var host = groupItems ? Remotes.Items : _itemHost;
                        var item = new RemoteBranchListItem(branch);
                        item.Activated += OnItemActivated;
                        if (groupRemoteBranches)
                        {
                            var ritem = GetRemoteListItem(branch);
                            if (ritem != null)
                            {
                                host = ritem.Items;
                            }
                        }
                        host.Add(item);
                    }
                    refs.ObjectAdded += OnRemoteBranchCreated;
                }
            }

            if ((referenceTypes & ReferenceType.Tag) == ReferenceType.Tag)
            {
                var refs = repository.Refs.Tags;
                lock (refs.SyncRoot)
                {
                    foreach (var tag in refs)
                    {
                        if (predicate != null && !predicate(tag))
                        {
                            continue;
                        }
                        var item = new TagListItem(tag);
                        item.Activated += OnItemActivated;
                        CustomListBoxItemsCollection host;
                        if (groupItems)
                        {
                            host = Tags.Items;
                        }
                        else
                        {
                            host = _itemHost;
                        }
                        host.Add(item);
                    }
                    refs.ObjectAdded += OnTagCreated;
                }
            }

            if (groupItems)
            {
                _itemHost.Add(Heads);
                _itemHost.Add(Remotes);
                _itemHost.Add(Tags);
            }
        }
Example #53
0
		bool WriteReferences (MakefileVar refVar, ReferenceType refType, bool makeRelative, string id)
		{
			//Reference vars can be shared too, so use existing list
			//Eg. REF for both Gac and Asm ref
			List<string> references = Makefile.GetListVariable (refVar.Name);
			if (references == null) {
				//Var not found, skip
				string msg = GettextCatalog.GetString (
                                        "Makefile variable '{0}' not found. Skipping syncing of '{1}' references.", refVar.Name, id);
				LoggingService.LogWarning (msg);
				monitor.ReportWarning (msg);
				return false;
			}

			//if .Value is true
			//	key -> Varname, Emit as $key_LIBS
			//if .Value is false
			//	key -> pkgname, emit as -pkg:$key
			Dictionary<string, bool> hasAcSubstPackages = new Dictionary<string, bool> ();

			foreach (ProjectReference pr in ((DotNetProject)OwnerProject).References) {
				if (pr.ReferenceType != refType)
					continue;

				string refstr = String.Empty;
				switch (refType) {
				case ReferenceType.Gac:
					//Assemblies coming from packages are always added as Gac
					refstr = GacRefToString (pr, hasAcSubstPackages, refVar);
					if (refstr == null)
						continue;
					break;
				case ReferenceType.Assembly:
					refstr = AsmRefToString (pr.Reference, refVar, false);
					break;
				case ReferenceType.Project:
					refstr = ProjectRefToString (pr, refVar);
					if (refstr == null)
						continue;
					break;
				default:
					//not supported
					continue;
				}

				references.Add (String.Format ("{0}{1}", refVar.Prefix, refstr));
			}

			//Add packages
			foreach (KeyValuePair<string, bool> pair in hasAcSubstPackages) {
				if (pair.Value)
					references.Add (String.Format ("$({0}_LIBS)", pair.Key));
				else
					references.Add (String.Format ("-pkg:{0}", pair.Key));
			}

			foreach (string s in refVar.Extra)
				references.Add (s);

			Makefile.SetListVariable (refVar.Name, references);
			return true;
		}
Example #54
0
 public OracleDataObjectReference(ReferenceType referenceType)
 {
     Type = referenceType;
 }
Example #55
0
		//FIXME: change return type to bool, on false, extra.Add (reference)
		void ParseReference (string reference, bool usePrefix, MakefileVar refVar, int len, ReferenceType refType, 
				DotNetProject project)
		{
			string rname = reference;
			// .StartsWith "$("
			if (rname.Length > 3 && rname [0] == '$' && rname [1] == '(' && rname [rname.Length - 1] == ')') {
				if (!UseAutotools) {
					refVar.Extra.Add (reference);
					return;
				}

				// Autotools based project

				if (!rname.EndsWith ("_LIBS)")) {
					//Not a pkgconfig *_LIBS var
					refVar.Extra.Add (reference);
					return;
				}

				string pkgVarName = rname.Substring (2, rname.Length - 3).Replace ("_LIBS", String.Empty);
				List<PackageContent> pkgNames = ConfiguredPackages.GetPackageContentFromVarName (pkgVarName);
				if (pkgNames == null) {
					 LoggingService.LogWarning  ("Package named '{0}' not found in configure.in. Ignoring reference to '{1}'.",
						pkgVarName, rname);
					refVar.Extra.Add (reference);
					return;
				}

				bool added = false;
				foreach (PackageContent packageContent in pkgNames) {
					if (ReferencedPackages.Contains (packageContent.Name)) {
						added = true;
						continue;
					}

					// Add all successfully added packages to ReferencedPackages
					foreach (string referencedName in packageContent.AllReferencedNames) {
						if (LoadPackageReference (referencedName, project, refVar.Prefix)) {
							ReferencedPackages.Add (referencedName);
							added = true;
						}
					}
				}

				// none of the packages could be added
				if (!added)
					refVar.Extra.Add (reference);

				return;
			}

			// .StartsWith "-pkg:"
			if (rname.Length >= 5 && rname [0] == '-' && rname [1] == 'p' && rname [2] == 'k' && rname [3] == 'g' && rname [4] == ':') {
				string pkgName = rname.Substring (5);
				//-pkg:foo,bar
				foreach (string s in pkgName.Split (new char [] {','}, StringSplitOptions.RemoveEmptyEntries)) {
					if (ReferencedPackages.Contains (s))
						continue;

					if (LoadPackageReference (s, project, refVar.Prefix))
						ReferencedPackages.Add (s);
					else
						refVar.Extra.Add ("-pkg:" + s);
				}

				return;
			}

			if (usePrefix && String.Compare (refVar.Prefix, 0, rname, 0, len) == 0)
				rname = rname.Substring (len);

			//FIXME: try/catch around the split refs ?
			bool varFound = false;
			foreach (string r in rname.Split (new char [] {','}, StringSplitOptions.RemoveEmptyEntries)) {
				string refname = r;
				if (refname.Length >= 2 && refname [0] == '$' && refname [1] == '(' && !UseAutotools) {
					//Eg. -r:$(top_builddir)/foo.dll
					refVar.Extra.Add (reference);
					continue;
				}

				varFound = false;
				refname = ResolveBuildVars (refname, ref varFound);
				EncodeValues [refVar.Name] |= varFound;

				string fullpath = Path.GetFullPath (Path.Combine (BaseDirectory, refname));
				
				// if refname is part of a package then add as gac
				// but don't do it if the refname exactly matches a file name in the project dir
				if (refname.IndexOf (Path.DirectorySeparatorChar) < 0 && !File.Exists (fullpath) &&
					ParseReferenceAsGac (refname, project) != null)
					continue;
				
				if (TryGetExistingGacRef (fullpath) != null)
					continue;

				if (refname.IndexOf (Path.DirectorySeparatorChar) < 0) {
					// Check that its a valid assembly
					string fullname = null;
					try {
						fullname = AssemblyName.GetAssemblyName (fullpath).FullName;
					} catch (FileNotFoundException) {
					} catch (BadImageFormatException) {
					}

					// Valid assembly, From a package, add as Gac
					SystemPackage pkg = assemblyContext.GetPackageFromPath (fullpath);
					if (fullname != null && pkg != null) {
						SystemAssembly sa = assemblyContext.GetAssemblyFromFullName (fullname, pkg.Name, project.TargetFramework);
						if (sa != null) {
							AddNewGacReference (project, sa);
							continue;
						}
					}
				}

				//Else add to unresolved project refs, avoid repeats
				if (!UnresolvedReferences.ContainsKey (fullpath))
					UnresolvedReferences [fullpath] = fullpath;
			}
		}
Example #56
0
 public static SnapshotSectionType GetSnapshotSection(
     vCloudClient client,
     ReferenceType vappRef)
 {
     return(SdkUtil.Get <SnapshotSectionType>(client, vappRef.href + "/snapshotSection", 200));
 }
 public void VisitReferenceType(ReferenceType referenceType)
 {
     // no op
 }
Example #58
0
 public SymbolicReferenceData(string targetObject, ReferenceType targetType)
 {
     TargetObject = targetObject;
     TargetType   = targetType;
 }
		bool IsSelected (ReferenceType type, string name, string pkg)
		{
			return selection.Contains (type + " " + name + " " + pkg);
		}
Example #60
0
        private void SignObject(XmlDocument doc, object rps)
        {
            XmlNodeList nodes = doc.GetElementsByTagName("Signature");

            if (nodes.Count > 0)
            {
                SignatureType sign = new SignatureType();

                //Grupo: Signature->SignedInfo
                sign.SignedInfo = new SignedInfoType();

                sign.SignedInfo.CanonicalizationMethod           = new CanonicalizationMethodType();
                sign.SignedInfo.CanonicalizationMethod.Algorithm = doc.GetElementsByTagName("CanonicalizationMethod")[0].Attributes[0].Value; // Tag: CanonicalizationMethod

                sign.SignedInfo.SignatureMethod           = new SignatureMethodType();
                sign.SignedInfo.SignatureMethod.Algorithm = doc.GetElementsByTagName("SignatureMethod")[0].Attributes[0].Value; // Tag: SignatureMethod

                // Grupo: Signature->SignedInfo->Reference
                sign.SignedInfo.Reference = new ReferenceType[1];

                ReferenceType teste = new ReferenceType();

                teste.URI                    = doc.GetElementsByTagName("Reference")[0].Attributes[0].Value;
                teste.DigestMethod           = new DigestMethodType();
                teste.DigestMethod.Algorithm = doc.GetElementsByTagName("DigestMethod")[0].Attributes[0].Value;
                teste.DigestValue            = GetBytes(doc.GetElementsByTagName("DigestValue")[0].InnerText);
                sign.SignedInfo.Reference[0] = teste;

                // Grupo: Signature->SignedInfo->Reference->Transforms
                XmlNodeList transforms = doc.GetElementsByTagName("Transform");
                sign.SignedInfo.Reference[0].Transforms = new TransformType[transforms.Count];

                int run = 0;
                foreach (XmlNode item in transforms)
                {
                    TransformType qq = new TransformType();
                    qq.Algorithm = item.Attributes[0].Value;
                    sign.SignedInfo.Reference[0].Transforms[run] = qq;
                    run += 1;
                }

                //Tag: Signature->SignatureValue
                sign.SignatureValue       = new SignatureValueType();
                sign.SignatureValue.Value = GetBytes(doc.GetElementsByTagName("SignatureValue")[0].InnerText);

                //Grupo: Signature->KeyInfo
                sign.KeyInfo = new KeyInfoType();
                X509DataType x509 = new X509DataType();
                x509.Items            = new object[1];
                x509.Items[0]         = GetBytes(doc.GetElementsByTagName("X509Certificate")[0].InnerText);
                x509.ItemsElementName = new ItemsChoiceType1[1] {
                    ItemsChoiceType1.X509Certificate
                };

                sign.KeyInfo.Items    = new object[1];
                sign.KeyInfo.Items[0] = x509;

                sign.KeyInfo.ItemsElementName = new ItemsChoiceType2[1] {
                    ItemsChoiceType2.X509Data
                };

                SetProperty(rps, "Signature", sign);
            }
        }