Spv.StorageClass ConvertStorageClass(StorageClass storageClass) { if (storageClass == StorageClass.Function) { return(Spv.StorageClass.StorageClassFunction); } else if (storageClass == StorageClass.Private) { return(Spv.StorageClass.StorageClassPrivate); } else if (storageClass == StorageClass.Generic) { return(Spv.StorageClass.StorageClassGeneric); } else if (storageClass == StorageClass.Input) { return(Spv.StorageClass.StorageClassInput); } else if (storageClass == StorageClass.Output) { return(Spv.StorageClass.StorageClassOutput); } else if (storageClass == StorageClass.Uniform) { return(Spv.StorageClass.StorageClassUniform); } else if (storageClass == StorageClass.UniformConstant) { return(Spv.StorageClass.StorageClassUniformConstant); } return(Spv.StorageClass.StorageClassFunction); }
public FuncDef(String name, StorageClass scs, FunctionType type, Stmt stmt) { this.name = name; this.scs = scs; this.type = type; this.stmt = stmt; }
private static void ReadTransition(IList <S3Transition> list, XmlReader xmlReader) { DateTimeOffset?date = null; int? days = null; StorageClass storageClass = StorageClass.Unknown; foreach (string name in XmlHelper.ReadElements(xmlReader, "Transition")) { switch (name) { case "Date": date = ValueHelper.ParseDate(xmlReader.ReadString(), DateTimeFormat.Iso8601DateTimeExt); break; case "Days": days = ValueHelper.ParseInt(xmlReader.ReadString()); break; case "StorageClass": storageClass = ValueHelper.ParseEnum <StorageClass>(xmlReader.ReadString()); break; } } if (date == null && days == null || storageClass == StorageClass.Unknown) { throw new InvalidOperationException("Missing required values"); } list.Add(new S3Transition(date, days, storageClass)); }
private static void ReadNonCurrentVersionTransition(IList <S3NonCurrentVersionTransition> list, XmlReader xmlReader) { int? nonCurrentDays = null; StorageClass storageClass = StorageClass.Unknown; foreach (string name in XmlHelper.ReadElements(xmlReader, "NoncurrentVersionTransition")) { switch (name) { case "NoncurrentDays": nonCurrentDays = ValueHelper.ParseInt(xmlReader.ReadString()); break; case "StorageClass": storageClass = ValueHelper.ParseEnum <StorageClass>(xmlReader.ReadString()); break; } } if (nonCurrentDays == null || storageClass == StorageClass.Unknown) { throw new InvalidOperationException("Missing required values"); } list.Add(new S3NonCurrentVersionTransition(nonCurrentDays.Value, storageClass)); }
public void save(StorageClass s) { s.position = getPos(); s.date = getDate(); s.money = GameObject.Find("Money").GetComponent <economy>().GetMoney(); s.profit = GameObject.Find("Money").GetComponent <economy>().GetProfit(); s.rep = GameObject.Find("Rep").GetComponent <reputation>().GetRep(); s.GeneratedClients = GameData.generatedClients; //s.clients = GameData.clients; s.servers = new List <ServerData>(); Debug.Log("Number of servers22 - " + GameData.servers.Count); foreach (ServerPlacedScript server in GameData.servers) { s.servers.Add(server.data); } string jsonData = JsonUtility.ToJson(s, true); File.WriteAllText(Application.persistentDataPath + "/Save.json", ""); //File.WriteAllText("./Assets/Saves/Save.json", ""); File.WriteAllText(Application.persistentDataPath + "/Save.json", jsonData); //File.WriteAllText("./Assets/Saves/Save.json", jsonData); }
//Save document to app local storage private async void AppBarButton_Save(object sender, RoutedEventArgs e) { //Create new Storage object storage = new StorageClass(); //Create textbox for new file name input TextBox inputTextBox = new TextBox(); inputTextBox.AcceptsReturn = false; inputTextBox.Height = 32; //Create content dialog box ContentDialog dialog = new ContentDialog(); //Load inputTextBox to dialog content dialog.Content = inputTextBox; dialog.Title = "Enter Document Name"; dialog.IsSecondaryButtonEnabled = true; dialog.PrimaryButtonText = "Ok"; //If file name text box is not empty save document to local storage with specified name and editor contents if (await dialog.ShowAsync() == ContentDialogResult.Primary && inputTextBox.Text != null && inputTextBox.Text != "") { storage.storeDocument(inputTextBox.Text, editor.Text); } //If file name is empty display error message else { var errorDialog = new MessageDialog("Please enter file name."); noFileName(); async void noFileName() { await errorDialog.ShowAsync(); } } }
/// <summary>Set a future date where the objects should transition.</summary> /// <param name="date">Indicates at what date the object is transitioned</param> /// <param name="storageClass">The storage class to which you want the object to transition.</param> public S3Transition(DateTimeOffset date, StorageClass storageClass) { Validator.RequireThat(storageClass != StorageClass.Unknown, nameof(storageClass)); TransitionOnDate = date; StorageClass = storageClass; }
public Decln(String name, StorageClass scs, ExprType type, Option <Initr> initr) { this.name = name; this.scs = scs; this.type = type; this.initr = initr; }
public Variable(int resultType, int resultId, StorageClass storageClass, int?initializerId = null) { ResultType = resultType; ResultId = resultId; StorageClass = storageClass; InitializerId = initializerId; }
/// <summary> /// 增加一条数据 /// </summary> public int AddStorageListInfo(StorageClass model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into tbStorageClassInfo("); strSql.Append("sParentID,sClassName,sOrder,sAppendTime)"); strSql.Append(" values ("); strSql.Append("@sParentID,@sClassName,@sOrder,@sAppendTime)"); strSql.Append(";select @@IDENTITY"); SqlParameter[] parameters = { new SqlParameter("@sParentID", SqlDbType.Int, 4), new SqlParameter("@sClassName", SqlDbType.VarChar, 50), new SqlParameter("@sOrder", SqlDbType.Int, 4), new SqlParameter("@sAppendTime", SqlDbType.DateTime) }; parameters[0].Value = model.SParentID; parameters[1].Value = model.SClassName; parameters[2].Value = model.SOrder; parameters[3].Value = model.SAppendTime; object obj = DbHelper.ExecuteScalar(CommandType.Text, strSql.ToString(), parameters); if (obj == null) { return(1); } else { return(Convert.ToInt32(obj)); } }
/// <summary> /// Creates a new intance of <see cref="CreateBucketRequest" />. /// </summary> /// <param name="bucketName">bucket name</param> /// <param name="storageClass">the bucket storage class</param> /// <param name="acl">the bucket acl</param> public CreateBucketRequest(string bucketName, StorageClass storageClass, CannedAccessControlList acl) { BucketName = bucketName; StorageClass = storageClass; ACL = acl; DataRedundancyType = null; }
internal Symbol(string name, IrisType type, StorageClass storage, int location, ImportedMember importInfo) { Name = name; Type = type; StorageClass = storage; Location = location; ImportInfo = importInfo; }
/// <summary>Indicates the number of days after creation when objects are transitioned to the specified storage class.</summary> /// <param name="transitionAfterDays">The value must be a positive integer.</param> /// <param name="storageClass">The storage class to which you want the object to transition.</param> public S3Transition(int transitionAfterDays, StorageClass storageClass) { Validator.RequireThat(transitionAfterDays > 0, nameof(transitionAfterDays)); Validator.RequireThat(storageClass != StorageClass.Unknown, nameof(storageClass)); TransitionAfterDays = transitionAfterDays; StorageClass = storageClass; }
/// <summary> /// 创建空间 /// </summary> /// <param name="bucketName">待创建的空间名</param> /// <param name="zone">存储区域</param> /// <param name="storageClass">存储类型</param> /// <param name="persistentOps">策略(其中的空间名、区域不作为本次创建空间的条件)</param> public CreateBucketParam(string bucketName, int?zone, StorageClass storageClass = null, BasePersistentOps persistentOps = null) : this() { BucketName = bucketName; Zone = zone; StorageClass = storageClass; PersistentOps = persistentOps ?? new BasePersistentOps(); }
public void ChangeTypeRange(string bucket, string keys, int storageClass) { var ret = this._storageProvider.ChangeTypeRange(new ChangeTypeRangeParam(keys.ConvertStrToList <string>(), StorageClass.GetAll <StorageClass>().FirstOrDefault(x => x.Id == storageClass), new BasePersistentOps() { Bucket = bucket })); }
// // // public void importPropertyBag(string bag) { try { store = DeserializeObject <StorageClass>(bag); } catch (Exception ex) { throw new IndexException("ImportPropertyBag error", ex); } }
/// <summary> /// Write instruction operands into bytecode stream. /// </summary> /// <param name="writer">Bytecode writer.</param> public override void WriteOperands(WordWriter writer) { StorageClass.Write(writer); if (Initializer != null) { Initializer.Write(writer); } }
internal Symbol(string name, IrisType type, StorageClass storage, int location, ImportedMember importInfo) { Name = name; Type = type; StorageClass = storage; Location = location; ImportInfo = importInfo; }
public S3Upload(string objectKey, string uploadId, S3Identity?initiator, S3Identity?owner, StorageClass storageClass, DateTimeOffset initiated) { ObjectKey = objectKey; UploadId = uploadId; Initiator = initiator; Owner = owner; StorageClass = storageClass; Initiated = initiated; }
public S3Object(string objectKey, DateTimeOffset lastModifiedOn, long size, S3Identity?owner, string?eTag, StorageClass storageClass) { ObjectKey = objectKey; LastModifiedOn = lastModifiedOn; Size = size; Owner = owner; ETag = eTag; StorageClass = storageClass; }
public EffectParameterDefinition(String name, HlslTypeDefinition type, HlslSemantic semantic) { Name = name; Type = type; HasStorageClass = false; HasSemantic = true; StorageClass = StorageClass.None; Semantic = semantic; }
public EffectParameterDefinition(String name, HlslTypeDefinition type, StorageClass storageClass) { Name = name; Type = type; HasStorageClass = true; HasSemantic = false; StorageClass = storageClass; Semantic = new HlslSemantic(); }
/// <summary> /// Calculate number of words to fit complete instruction bytecode. /// </summary> /// <returns>Number of words in instruction bytecode.</returns> public override uint GetWordCount() { uint wordCount = 0; wordCount += IdResult.GetWordCount(); wordCount += StorageClass.GetWordCount(); wordCount += Type.GetWordCount(); return(wordCount); }
public WindowMain() { StorageClass.SetUpStorage(); _projectOverviewView = new ProjectOverviewView(); _employeeOverviewView = new EmployeeOverviewView(); InitializeComponent(); ProjectOverviewTabItem.Content = _projectOverviewView; EmplyeeOverviewTabItem.Content = _employeeOverviewView; }
public EffectParameterDefinition(String name, HlslTypeDefinition type, StorageClass storageClass) { Name = name; Type = type; HasStorageClass = true; HasSemantic = false; StorageClass = storageClass; Semantic = new HlslSemantic(); }
public EffectParameterDefinition(String name, HlslTypeDefinition type, HlslSemantic semantic) { Name = name; Type = type; HasStorageClass = false; HasSemantic = true; StorageClass = StorageClass.None; Semantic = semantic; }
private static S3Version ParseVersion(XmlReader xmlReader) { string? objectKey = null; string? versionId = null; bool? isLatest = null; DateTimeOffset?lastModified = null; string? etag = null; int size = -1; StorageClass storageClass = StorageClass.Unknown; S3Identity? owner = null; foreach (string name in XmlHelper.ReadElements(xmlReader, "Version")) { switch (name) { case "Key": objectKey = xmlReader.ReadString(); break; case "VersionId": versionId = xmlReader.ReadString(); break; case "IsLatest": isLatest = ValueHelper.ParseBool(xmlReader.ReadString()); break; case "LastModified": lastModified = ValueHelper.ParseDate(xmlReader.ReadString(), DateTimeFormat.Iso8601DateTimeExt); break; case "ETag": etag = xmlReader.ReadString(); break; case "Size": size = ValueHelper.ParseInt(xmlReader.ReadString()); break; case "StorageClass": storageClass = ValueHelper.ParseEnum <StorageClass>(xmlReader.ReadString()); break; case "Owner": owner = ParserHelper.ParseOwner(xmlReader); break; } } if (objectKey == null || isLatest == null || lastModified == null || etag == null || size == -1) { throw new InvalidOperationException("Missing required values"); } return(new S3Version(objectKey, versionId, isLatest.Value, lastModified.Value, etag, size, owner, storageClass)); }
public Symbol Add(string name, IrisType type, StorageClass storage, int location, ImportedMember importInfo = null) { Symbol symbol = new Symbol(name, type, storage, location, importInfo); if (storage == StorageClass.Global) _global.Add(name, symbol); else _local.Add(name, symbol); return symbol; }
public override StringBuilder ToString(StringBuilder sb) { sb.Append(StorageClass.ToString()).Append(' '); if (Type != null) { Type.ToString(sb); } sb.Append('*'); return(sb); }
private static SpvInstruction DeclareMemory(CodeGenContext context, StorageClass storage, int size) { var arrayType = context.TypeArray(context.TypeU32(), context.Constant(context.TypeU32(), size)); var pointerType = context.TypePointer(storage, arrayType); var variable = context.Variable(pointerType, storage); context.AddGlobalVariable(variable); return(variable); }
public S3Version(string objectKey, string?versionId, bool isLatest, DateTimeOffset lastModified, string etag, int size, S3Identity?owner, StorageClass storageClass) { ObjectKey = objectKey; VersionId = versionId; IsLatest = isLatest; LastModified = lastModified; Etag = etag; Size = size; Owner = owner; StorageClass = storageClass; }
private string GenerateCreateQuery(IDictionary <string, StorageClass> fields) { string fieldDefs = string.Join(",", fields.Select(kvp => { string columnName = kvp.Key; StorageClass storageClass = kvp.Value; return($"\"{columnName}\" {StorageClassToSql(storageClass)}"); })); return($"CREATE TABLE {TableName} ({fieldDefs})"); }
public RenewableRequest(string key, string parameter = null, int order = 0, StorageClass store = StorageClass.None, DownloadFileType type = DownloadFileType.None) { this.key = key; this.parameter = parameter; this.order = order; this.store = store; this.type = type; }
public async Task PutObjectStorageClass(StorageClass storageClass, bool canDownload) { PutObjectResponse putResp = await UploadAsync(nameof(PutObjectStorageClass) + "-" + storageClass, req => req.StorageClass = storageClass).ConfigureAwait(false); Assert.Equal(storageClass, putResp.StorageClass); if (canDownload) { GetObjectResponse getResp = await AssertAsync(nameof(PutObjectStorageClass) + "-" + storageClass).ConfigureAwait(false); Assert.Equal(storageClass, getResp.StorageClass); } }
public static string GetStorageClassString(StorageClass stC) { var member = typeof(StorageClass).GetMember(stC.ToString()) .FirstOrDefault(); if (member != null) { var att = member.GetCustomAttributes(typeof(KeywordAttribute), false) .Cast<KeywordAttribute>() .FirstOrDefault(); if (att != null) return att.Keyword; } return ""; }
private int GetNextLocation(StorageClass storage, IrisType type) { if (storage == StorageClass.Global) { if (type.IsMethod) return _nextGlobalMethod++; else return _nextGlobalVariable++; } else if (storage == StorageClass.Argument) { return _nextArgument++; } else { return _nextLocal++; } }
/// <remarks/> public void PutObjectInlineAsync(string Bucket, string Key, MetadataEntry[] Metadata, byte[] Data, long ContentLength, Grant[] AccessControlList, StorageClass StorageClass, bool StorageClassSpecified, string AWSAccessKeyId, System.DateTime Timestamp, bool TimestampSpecified, string Signature, string Credential, object userState) { if ((this.PutObjectInlineOperationCompleted == null)) { this.PutObjectInlineOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPutObjectInlineOperationCompleted); } this.InvokeAsync("PutObjectInline", new object[] { Bucket, Key, Metadata, Data, ContentLength, AccessControlList, StorageClass, StorageClassSpecified, AWSAccessKeyId, Timestamp, TimestampSpecified, Signature, Credential}, this.PutObjectInlineOperationCompleted, userState); }
/// <remarks/> public void PutObjectInlineAsync(string Bucket, string Key, MetadataEntry[] Metadata, byte[] Data, long ContentLength, Grant[] AccessControlList, StorageClass StorageClass, bool StorageClassSpecified, string AWSAccessKeyId, System.DateTime Timestamp, bool TimestampSpecified, string Signature, string Credential) { this.PutObjectInlineAsync(Bucket, Key, Metadata, Data, ContentLength, AccessControlList, StorageClass, StorageClassSpecified, AWSAccessKeyId, Timestamp, TimestampSpecified, Signature, Credential, null); }
public PutObjectResult PutObjectInline(string Bucket, string Key, [System.Xml.Serialization.XmlElementAttribute("Metadata")] MetadataEntry[] Metadata, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] Data, long ContentLength, [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)] Grant[] AccessControlList, StorageClass StorageClass, [System.Xml.Serialization.XmlIgnoreAttribute()] bool StorageClassSpecified, string AWSAccessKeyId, System.DateTime Timestamp, [System.Xml.Serialization.XmlIgnoreAttribute()] bool TimestampSpecified, string Signature, string Credential) { object[] results = this.Invoke("PutObjectInline", new object[] { Bucket, Key, Metadata, Data, ContentLength, AccessControlList, StorageClass, StorageClassSpecified, AWSAccessKeyId, Timestamp, TimestampSpecified, Signature, Credential}); return ((PutObjectResult)(results[0])); }
public Symbol Add(string name, IrisType type, StorageClass storage, ImportedMember importInfo = null) { int location = GetNextLocation(storage, type); return Add(name, type, storage, location, importInfo); }
public FuncDef(String name, StorageClass scs, FunctionType type, Stmt stmt) { this.name = name; this.scs = scs; this.type = type; this.stmt = stmt; }
public Decln(String name, StorageClass scs, ExprType type, Option<Initr> initr) { this.name = name; this.scs = scs; this.type = type; this.initr = initr; }
protected virtual bool IsCoverableWithStorageClass( StorageClass storageClass) { return this.StorageClass == storageClass; }
public ValueNode(Datatype datatype, StorageClass storageClass) { this.datatype = datatype; this.storageClass = storageClass; }
/// <remarks/> public System.IAsyncResult BeginPutObjectInline(string Bucket, string Key, MetadataEntry[] Metadata, byte[] Data, long ContentLength, Grant[] AccessControlList, StorageClass StorageClass, bool StorageClassSpecified, string AWSAccessKeyId, System.DateTime Timestamp, bool TimestampSpecified, string Signature, string Credential, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("PutObjectInline", new object[] { Bucket, Key, Metadata, Data, ContentLength, AccessControlList, StorageClass, StorageClassSpecified, AWSAccessKeyId, Timestamp, TimestampSpecified, Signature, Credential}, callback, asyncState); }